Class: Wx::CheckListBox

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/classes/checklistbox.rb

Overview

A ListBox, where each item has a checkbox next to it

Instance Method Summary collapse

Instance Method Details

#append(item, data = nil) ⇒ Object

Call method in ControlWithItems, then sync item data



13
14
15
16
# File 'lib/wx/classes/checklistbox.rb', line 13

def append(item, data = nil)
  super(item)
  __wx_item_data[count - 1] = data
end

#clearObject

Call method in ControlWithItems, then sync item data



19
20
21
22
# File 'lib/wx/classes/checklistbox.rb', line 19

def clear
  super
  __wx_item_data.clear
end

#get_checked_itemsObject

Returns an array of indices of items that are currently checked.



32
33
34
# File 'lib/wx/classes/checklistbox.rb', line 32

def get_checked_items
  find_all { | i | checked?(i) }    
end

#get_item_data(n) ⇒ Object

Wholly redefined here



37
38
39
# File 'lib/wx/classes/checklistbox.rb', line 37

def get_item_data(n)
  __wx_item_data[n]
end

#set_item_data(n, data) ⇒ Object

Wholly redefined here



42
43
44
# File 'lib/wx/classes/checklistbox.rb', line 42

def set_item_data(n, data)
  __wx_item_data[n] = data
end