Class: WxSugar::EnumerableControl::StringsCollection
- Inherits:
-
ItemCollection
- Object
- ItemCollection
- WxSugar::EnumerableControl::StringsCollection
- Defined in:
- lib/wx_sugar/enumerable_controls.rb
Overview
A proxy class for classes that use get/set_string to set labels, inheriting from ControlWithItems.
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
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
132 133 134 |
# File 'lib/wx_sugar/enumerable_controls.rb', line 132 def [](i) super :get_string, i end |
#[]=(i, str) ⇒ Object
Sets a string within the control
137 138 139 |
# File 'lib/wx_sugar/enumerable_controls.rb', line 137 def []=(i, str) super :set_string, i, str end |
#each ⇒ Object
127 128 129 |
# File 'lib/wx_sugar/enumerable_controls.rb', line 127 def each cwi.each { | i | yield cwi.get_string(i) } end |