picktree function

If you need help on how to use the program
Post Reply
J
Posts: 224
Joined: 2008-02-17 17:09:26

picktree function

Post by J »

hi there,

I need to check if a string already exists as an item in the Picktree.

Is there a way/function to get an item/the whole list back from picktree?
I'm looking for something like

if mystring := PickTreeItem(count) then ...

There's no need to check the adress too.

thanks
J.
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

If it is not listed in the help file, there is no function for that (I didn't make one, so except if added later by soulsnake, it does not exist).
If you need to know what is in the tree, you may maintain a TStringList where you add the same content as what you add to the tree, so you can check there what is supposed to be in the tree.
J
Posts: 224
Joined: 2008-02-17 17:09:26

Post by J »

nope, found no function for that in the help file.

A second list is what I tried to avoid first, but I guess when I additionaly try to delete an item from the tree, another function would be necessary and so on.

So I better do the whole stuff in a list first and fill the tree at the end with all the items from the list.

thanks
J.
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Indeed, filling the tree from another list is probably more efficient/clean then ;)
Post Reply