Sign in to follow this  

Populating tree component from script

Recommended Posts


I am trying to populate the tree component from script. I can't seem to populate the Child(1)...Child(n) I only fill the TreeListA...E etc without any ability to expand or collapse the list. When the component is placed on the page it shows as having Tree List A and Tree List B each with 3 children and the list can be collapsed by clicking on the '-' symbol before a tree list entry. The resultant '+' symbol expands the list correctly.

The DeleteItem(Item) needs a handle (Item) but InsertItem doesn't seem to give one as:

Private TreeHandle = Component.DirectoryTree.InsertItem("root",0,0,0)

? TreeHandle

just prints a blank line The properties of the TreeList allow a component name to be entered (In this case DirectoryTrree but otherwise the window is blank.

The Help is the same as the user manual section on Tree Lists.

Can you explain a bit more how to populate tree lists with the array data such as that returned from GetFilePathList.



Share this post

Link to post
Share on other sites

Not sure. It worked perfectly for me. Prints out something like 233853680 and adds it to the tree. You can then make a child of the item by passing this value into InsertItem().

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this