noreply at rubyforge.org
2006-Nov-23 00:06 UTC
[Wxruby-development] [ wxruby-Feature Requests-6826 ] Add a traverse method to Wx::TreeCtrl
Feature Requests item #6826, was opened at 2006-11-22 19:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=221&aid=6826&group_id=35 Category: None Group: None Status: Open Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: Add a traverse method to Wx::TreeCtrl Initial Comment: There is no simple way at the moment to iterate all the items contained within a TreeCtrl. A neat ruby-ish method would allow a block to be passed which would receive the id''s of each treectrl item in turn. An optional parameter to the 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
Maybe Matching Threads
- [940] trunk/wxsugar/lib/wx_sugar/wx_classes/treectrl.rb: Align #traverse usage with #each in enumerable_controls.rb
- [793] trunk/wxsugar/lib/wx_sugar/wx_classes/treectrl.rb: Moved traverse method in wxSugar
- TreeCtrl#traverse patch
- [832] trunk/wxruby2/samples: Fix samples for TreeItemIds as integers, fix image size in treectrl sample
- [800] trunk/wxruby2/doc/textile/treectrl.txtl: TreeCtrl#traverse has moved to wx sugar