Copy link to clipboard
Copied
Hello,
I am writing a script using extendScript for Illustrator to create a UI to enter information. I have a list of options that works as a drop down menu, but I am trying the tree view type of menu so I can collapse different options, but I don't know how to get the index of the selected item from the node. Can anyone point me in the right direction?
Thanks
1 Correct answer
Thanks! I will give that a try, and thanks for the PDF.
Explore related tutorials & articles
Copy link to clipboard
Copied
page 45 - 57 is all treeview related information.
never worked with treeviews before but without any other information of your script
treeview.selection.index
Copy link to clipboard
Copied
Thanks! I will give that a try, and thanks for the PDF.
Copy link to clipboard
Copied
It looks like each node in the tree view menu begins a new array at index 0 for all the items within it, but if the top of the tree is searched by the specific entry of each item, than it works.
if (topTree.selection === item) {
code block for this item
}

