search for: set_item_text

Displaying 9 results from an estimated 9 matches for "set_item_text".

Did you mean: get_item_text
2007 Sep 10
2
syntax II
...out, but I fairly often want to loop over a control with multiple items (eg Choice, ListCtrl, ListBox) to find or alter a particular item. So for those classes I wonder if we should add an ''each'' method that passes in turn each valid index into the widget: listbox.each { | i | set_item_text(i, item_text(i).upcase) } Or even: listbox.each { | i | self.item_text[i] = item_text[i].upcase } Anyway, shout if you love this or hate these... cheers alex
2007 Sep 17
7
Re : syntax II
...often want to loop over a >control with multiple items (eg Choice, ListCtrl, ListBox) to find or >alter a particular item. So for those classes I wonder if we should add >an ''each'' method that passes in turn each valid index into the widget: > >listbox.each { | i | set_item_text(i, item_text(i).upcase) } > Everything that makes wxRuby looks more Ruby is good. Nevertheless, I don''t know if I will use this feature often. Cheers. Chauk-Mean.
2007 Jan 06
0
[835] trunk/wxruby2/doc/textile: Updated documentation about TreeItemId
...eCtrl_appenditem which add items to a tree, and by </span><span class="cx"> TreeEvents which can be queried to find which item is being acted </span><del>-upon. The ids can then be passed in as arguments to methods which modify -items within the tree, such as "set_item_text":#TreeCtrl_setitemtext. -As well as the text label, tree items can have several other properties, -such as being bold, italic, and icons for expanded and collapsed -states. TreeItemIds which may be tested for validity by calling -TreeItemId#is_ok. </del><ins>+upon. The ids are pass...
2006 Nov 23
0
[ wxruby-Feature Requests-6826 ] Add a traverse method to Wx::TreeCtrl
...method could specify the id of an entry point to traverse from, to allow only part of the tree to be traversed. The default argument would be the root id. Example: # set all labels to upper case my_tree.traverse(some_id) do | item_id | new_label = my_tree.get_item_text(tree_id).upcase my_tree.set_item_text(tree_id, new_label) end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=221&aid=6826&group_id=35
2007 Apr 03
0
[942] trunk/wxsugar/lib/wx_sugar/wx_classes/listctrl.rb: Implement find_string method cognate with ControlWithItems
...emTextCollection </ins><span class="cx"> collection :data, ItemDataCollection </span><span class="cx"> </span><span class="cx"> alias :get_string :get_item_text </span><span class="cx"> alias :set_string :set_item_text </span><ins>+ alias :get_count :get_item_count </ins><span class="cx"> </span><ins>+ # Appends </ins><span class="cx"> def <<(str) </span><span class="cx"> insert_item(get_item_count, str) <...
2007 Apr 02
0
[938] trunk/wxsugar/lib/wx_sugar/wx_classes: Enable enumerable_controls for ListCtrl and ControlWithItems family
...@ -0,0 +1,14 @@ </span><ins>+require ''wx_sugar/enumerable_controls'' + +class Wx::ListCtrl + include WxSugar::EnumerableControl + collection :strings, StringsCollection + collection :data, ItemDataCollection + + alias :get_string :get_item_text + alias :set_string :set_item_text + + def <<(str) + insert_item(get_item_count, str) + end +end </ins></span></pre> </div> </div> </body> </html>
2007 Apr 03
0
[943] trunk/wxsugar/lib/wx_sugar/enumerable_controls.rb: Fix bug with false positives from #find_string, bounds-checking for
...lass ListItemTextCollection < ItemCollection + def each + cwi.each { | i | yield cwi.get_item_text(i) } + end + + # Retrieves the string for item +i+ + def [](i) + super :get_item_text, i + end + + # Sets a string within the control + def []=(i, str) + super :set_item_text, i, str + end + + def index?(i) + i >= 0 and i < cwi.get_item_count + end + end </ins><span class="cx"> end </span></span></pre> </div> </div> </body> </html>
2007 Apr 13
0
[956] branches/wxruby2/wxwidgets_282: Additions to TreeCtrl API 2.6->2.8
...Ctrl#is_visible":#TreeCtrl_isvisible </span><span class="lines">@@ -196,6 +201,7 @@ </span><span class="cx"> * "TreeCtrl#set_item_selected_image":#TreeCtrl_setitemselectedimage </span><span class="cx"> * "TreeCtrl#set_item_text":#TreeCtrl_setitemtext </span><span class="cx"> * "TreeCtrl#set_item_text_colour":#TreeCtrl_setitemtextcolour </span><ins>+* "TreeCtrl#set_quick_best_size":#TreeCtrl_setquickbestsize </ins><span class="cx"> * "Tre...
2006 Nov 16
0
[741] trunk/wxruby2: Fix get_item_data, hiding TreeItemData messiness, fix GC-ing (Alex Fenton)
...hese ids are returned by methods such as +"append_item":#TreeCtrl_appenditem which add items to a tree, and by +TreeEvents which can be queried to find which item is being acted +upon. The ids can then be passed in as arguments to methods which modify +items within the tree, such as "set_item_text":#TreeCtrl_setitemtext. +As well as the text label, tree items can have several other properties, +such as being bold, italic, and icons for expanded and collapsed +states. TreeItemIds which may be tested for validity by calling +TreeItemId#is_ok. + +TreeCtrls can be linked to non-GUI applicat...