Class: Rediscover::ListElementList
- Inherits:
-
Wx::ListCtrl
- Object
- Wx::ListCtrl
- Rediscover::ListElementList
- Includes:
- Wx
- Defined in:
- lib/rediscover/list_element_list.rb
Instance Method Summary collapse
-
#initialize(parent, key, elements) ⇒ ListElementList
constructor
A new instance of ListElementList.
- #set_elements(elements) ⇒ Object
- #setup ⇒ Object
Constructor Details
#initialize(parent, key, elements) ⇒ ListElementList
Returns a new instance of ListElementList.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/rediscover/list_element_list.rb', line 5 def initialize(parent, key, elements) @parent, @key = parent, key @redis = get_app.redis @logger = get_app.logger super(parent, :style => LC_REPORT) setup set_elements(elements) end |
Instance Method Details
#set_elements(elements) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/rediscover/list_element_list.rb', line 21 def set_elements(elements) delete_all_items i = 0 elements.each { |element| insert_item(i, element); i += 1 } @elements = elements end |
#setup ⇒ Object
16 17 18 19 |
# File 'lib/rediscover/list_element_list.rb', line 16 def setup insert_column(0, 'Elements') set_column_width(LIST_AUTOSIZE, -1) end |