Class Ui::WxWidgets::Widgets::SingleColListCtrl
In: ui/wx/widgets/propertiespane.rb
Parent: Wx::ListCtrl

Methods

Public Class methods

=============================================== public methods

[Source]

# File ui/wx/widgets/propertiespane.rb, line 32
        def initialize(parent, multiple, options, value)
         flags = Wx::LC_REPORT|Wx::LC_NO_HEADER
         if not multiple
           flags |= Wx::LC_SINGLE_SEL
         end
         super(parent, 
                -1,
                Wx::DEFAULT_POSITION, 
                Wx::Size.new(100, 100),
                flags)
         evt_size() {|event| onSize(event) }

         insert_column(0, 'Values')
         @options = options
         @options.each do |option|
           insert_item(get_item_count, option)
           if value.include?(option)
             set_item_state(get_item_count - 1, Wx::LIST_STATE_SELECTED, Wx::LIST_STATE_SELECTED)
           end
         end
         scroll_list(0, 0)
        end

Public Instance methods

[Source]

# File ui/wx/widgets/propertiespane.rb, line 66
        def get_options
          @options
        end

[Source]

# File ui/wx/widgets/propertiespane.rb, line 55
        def get_selections
          out = []
          item = -1
          while(true)
            item = get_next_item(item, Wx::LIST_NEXT_ALL, Wx::LIST_STATE_SELECTED)  
            break if item == -1
            out << get_item_text(item)
          end
          out
        end

[Validate]