Andreschrosa Posted April 2, 2009 Share Posted April 2, 2009 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 More sharing options...
AzeoTech Posted April 3, 2009 Share Posted April 3, 2009 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 More sharing options...
Andreschrosa Posted April 3, 2009 Author Share Posted April 3, 2009 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 More sharing options...
AzeoTech Posted April 7, 2009 Share Posted April 7, 2009 No, neither the name or index. Actually there is no index in a tree list. What would you index from? Anyhow, you should use the identifier passed when you added the parent. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.