Class: Lustr4Wx::List

Inherits:
Wx::ListBox
  • Object
show all
Includes:
Lustr::WidgetBase
Defined in:
lib/lustr-wx/list.rb

Instance Method Summary collapse

Instance Method Details

#contents=(contents) ⇒ Object



31
32
33
34
# File 'lib/lustr-wx/list.rb', line 31

def contents=(contents)
	@contents=contents
	set(contents.collect {|item| item.to_s })
end

#init_options(options) ⇒ Object



25
26
27
28
29
# File 'lib/lustr-wx/list.rb', line 25

def init_options(options)
	super
	
	evt_listbox(get_id()) { |event| raise_event(option(:on_click), event) } if option(:on_click)
end

#selectionsObject



36
37
38
# File 'lib/lustr-wx/list.rb', line 36

def selections
	get_selections.collect {|i| @contents[i] }
end