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
17
# File 'lib/wx/classes/checklistbox.rb', line 13

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

#clearObject

Call method in ControlWithItems, then sync item data



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

def clear
  super
  __wx_item_data.clear
end

#get_checked_itemsObject

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



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

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

#get_item_data(n) ⇒ Object

Wholly redefined here



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

def get_item_data(n)
  __wx_item_data[n]
end

#set_item_data(n, data) ⇒ Object

Wholly redefined here



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

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