### In Files

- rumix/wx.rb

### Parent

Wx::Panel

### Methods

- new
- on_select_dir

### Files

- wxruby2.lib

### Class Index

Quicksearch

- Wx
- Wx::AcceleratorTable
- Wx::Animation
- Wx::App
- Wx::ArtProvider
- Wx::AuiNotebook
- Wx::Bitmap
- Wx::BusyCursor
- Wx::CheckListBox
- Wx::Choice
- Wx::ClientDC
- Wx::Clipboard
- Wx::Colour
- Wx::ComboBox
- Wx::CommandEvent
- Wx::ControlWithItems
- Wx::DC
- Wx::Event
- Wx::EvtHandler
- Wx::Font
- Wx::Grid
- Wx::HelpController
- Wx::HelpControllerHelpProvider
- Wx::HelpProvider
- Wx::HtmlHelpController
- Wx::HtmlWindow
- Wx::Icon
- Wx::IconBundle
- Wx::Image
- Wx::ImageList
- Wx::KeywordConstructor
- Wx::KeywordConstructor::ClassMethods
- Wx::ListBox
- Wx::ListCtrl
- Wx::Locale
- Wx::MediaCtrl
- Wx::Menu
- Wx::MenuItem
- Wx::Notebook
- Wx::Object
- Wx::PaintDC
- Wx::Point
- Wx::PreviewFrame
- Wx::Rect
- Wx::RichTextCtrl
- Wx::SimpleHelpProvider
- Wx::Size
- Wx::Sizer
- Wx::Sound
- Wx::StandardPaths
- Wx::TextCtrl
- Wx::TextUrlEvent
- Wx::Timer
- Wx::ToolBar
- Wx::ToolBarTool
- Wx::TreeCtrl
- Wx::Window
- Wx::XmlResource
- Rumix
- Rumix::Application
- Rumix::Config
- Rumix::Registry
- Rumix::Widget
- Rumix::Widget::CheckOptionPanel
- Rumix::Widget::OptionItem
- Rumix::Widget::OptionPanel
- Rumix::Widget::RadioOptionPanel
- Rumix::Widget::TitleText
- ROpt
- ROpt::ArgumentParser
- ROpt::ParseResult
- Uconv
- Uconv::Error
- Enumerable
- File
- Ini
- Kernel
- Module
- Object
- Pathname
- WxConstructor
- WxRubyStyleAccessors

No matching classes.

# Rumix::Widget::OptionPanel

### Public Class Methods

new(parent, items) click to toggle source

(Not documented)

    # File rumix/wx.rb, line 67
                            def initialize(parent, items)
                                    super(parent)

                                    construct_children do |panel|
                                            # ラジオグループ全体を入れるSizer
                                            topsz = vbox_sizer do
                                                    vertical_border 8
                                                    expand
                                                    items.each_with_index do |item, i|
                                                            # 各ラジオボタンの関連パーツをまとめるSizer
                                                            vbox_sizer do
                                                                    expand
                                                                    widget panel.option_widget_class, :name => item.name, :label => item.label, :style => (i == 0 ? Wx::RB_GROUP : 0) do |widget|
                                                                            widget.value = item.selected
                                                                    end

                                                                    if item.description then
                                                                            # 付帯情報領域と左マージンを含んだSizer
                                                                            hbox_sizer do
                                                                                    stretch_spacer 1
                                                                                    proportion 11
                                                                                    # 付帯情報領域のSizer
                                                                                    static_vbox_sizer('') do
                                                                                            widget Wx::StaticText, :label => item.description do |text|
                                                                                                    text.name = item.options[:description_name] if item.options[:description_name]
                                                                                            end

                                                                                            if item.options[:path_name] then
                                                                                                    expand
                                                                                                    hbox_sizer do
                                                                                                            border 4
                                                                                                            proportion 1
                                                                                                            widget Wx::TextCtrl, :name => (item.options[:path_name] + '_text'), :value => item.options[:path_default]
                                                                                                            proportion 0
                                                                                                            widget Wx::Button, :label => '参照', :name => (item.options[:path_name] + '_button') do |button|
                                                                                                                    panel.evt_button(button, :on_select_dir)
                                                                                                            end # widget
                                                                                                    end # sizer
                                                                                            end # if
                                                                                    end # static_vbox_sizer

                                                                            end # hbox_sizer
                                                                    end # if item.description
                                                            end # vbox_sizer
                                                    end # items.each_with_index
                                            end # topsz

                                            topsz.fit(panel)

                                    end
                            end

### Public Instance Methods

on_select_dir(evt) click to toggle source

(Not documented)

    # File rumix/wx.rb, line 119
                            def on_select_dir(evt)
                                    text = find_window_by_name(evt.event_object.name.sub(/_button$/, '_text'))
                                    dialog = Wx::DirDialog.new(self, :default_path => text.value)
                                    if dialog.show_modal == Wx::ID_OK then
                                            text.value = dialog.path
                                    end

                            end

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.