Displaying 2 results from an estimated 2 matches for "insert_obj_item".
Did you mean:
insert_obj_items
2007 Nov 15
0
Code for Listbox object bulk adding
Hello!
Attached is a method to bulk add arrays to a list box, when the array
isn''t a string array. Feel free to add it to wxSugar.
Example:
arr = [[Wx::RED, "Red"],[Wx::GREEN, "Green"],[Wx::BLUE, "Blue"]]
listbox.insert_obj_items(arr, "[1]")
...would add 3 list box items with "Red"-"Green"-"Blue"
listbox.insert_obj_items(arr, "[1].length")
...would add 3 list box items with "3"-"5"-"4"
listbox.insert_obj_items(arr, ".length")
...wou...
2007 Nov 13
3
New wxTree method
Here''s my first try at a contribution to the wxRuby project:
The tree control seemed to lack a more Ruby-ish way to add a bulk of
items to a tree control (and to easily connect a data structure to a
tree). Since tree view can be seen as an array of arrays, I simply added
a method called append_array (see attached file). With it, you can add a
full tree as simple as:
---
root =