Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
3

Getting data from tree-view drop down list

Explorer ,
Feb 02, 2024 Feb 02, 2024

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

TOPICS
Scripting
540
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Feb 02, 2024 Feb 02, 2024

Thanks! I will give that a try, and thanks for the PDF.

Translate
Adobe
Participant ,
Feb 02, 2024 Feb 02, 2024

page 45 - 57 is all treeview related information.

 

never worked with treeviews before but without any other information of your script

treeview.selection.index 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 02, 2024 Feb 02, 2024

Thanks! I will give that a try, and thanks for the PDF.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 05, 2024 Feb 05, 2024
LATEST

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

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines