Class: WxSugar::EnumerableControl::ListItemTextCollection
- Inherits:
-
ItemCollection
- Object
- ItemCollection
- WxSugar::EnumerableControl::ListItemTextCollection
- Defined in:
- lib/wx_sugar/enumerable_controls.rb
Overview
Fetching strings from a ListCtrl
Instance Attribute Summary
Attributes inherited from ItemCollection
Instance Method Summary collapse
-
#[](i) ⇒ Object
Retrieves the string for item
i
. -
#[]=(i, str) ⇒ Object
Sets a string within the control.
- #each ⇒ Object
- #index?(i) ⇒ Boolean
Methods inherited from ItemCollection
Constructor Details
This class inherits a constructor from WxSugar::EnumerableControl::ItemCollection
Instance Method Details
#[](i) ⇒ Object
Retrieves the string for item i
149 150 151 |
# File 'lib/wx_sugar/enumerable_controls.rb', line 149 def [](i) super :get_item_text, i end |
#[]=(i, str) ⇒ Object
Sets a string within the control
154 155 156 |
# File 'lib/wx_sugar/enumerable_controls.rb', line 154 def []=(i, str) super :set_item_text, i, str end |
#each ⇒ Object
144 145 146 |
# File 'lib/wx_sugar/enumerable_controls.rb', line 144 def each cwi.each { | i | yield cwi.get_item_text(i) } end |
#index?(i) ⇒ Boolean
158 159 160 |
# File 'lib/wx_sugar/enumerable_controls.rb', line 158 def index?(i) i >= 0 and i < cwi.get_item_count end |