Searching a Tree list


Recommended Posts

How could I search a tree list for a specific item using a sequence? It seems component.treelist.GetItemText could be used for that, but that would require me to know how many indexes there are in the tree list, however getnumrows donsent seen to work on tree lists.

Link to comment
Share on other sites

Tree lists are kind-of funky. Its a Windows thing. They aren't designed to be a storage structure on their own, just a display, and you can't really step through the elements or search. You really have to keep your own internal structure in variables and then just use the tree to display it. The data portion of the tree then allows you to tag the tree item to a particular internal element.

Link to comment
Share on other sites

Ok, I managed to turn around that.

Now I'm having some trouble inserting items after their parents.

I have an class structure of:

project -> group list -> equipment list.

In my tree list I have the groups then I want to insert each equipment having as parent it's group from the class structure. How do I do it? Should I pass the name of the parent (string) or an index (number) for it?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.