wxTreeCtrl : find a way to know which groups my node belongs

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
romeo9423
Experienced Solver
Experienced Solver
Posts: 72
Joined: Mon Nov 08, 2004 3:36 pm

wxTreeCtrl : find a way to know which groups my node belongs

Post by romeo9423 »

Hi,

I would like to know what are the techniques to know if a node of my tree belongs to a "group". When I add a node I use AppendItem how can I associate a wxTreeId with a group (for instance folders or files or zipped files ...)?

Should I everytime that I create a node, save its wxTreeId in a list of structure ?

ex :
AddItem (MyClass::eFooGroup, "Hello");
AddItem (MyClass::eAnotherGroup, "Hi");
...
So AddItem is a method that add a node to an existing node identified by a n enum.



And when I select an item I could do a GetSelection that returns
wxTreeId and the group it belongs to ?
Post Reply