I am building a dynamic tree box based on a directory structure.....so I don't know in advance how many roots and nodes there will be in the tree. The final nodes of the tree could have the same name. I then put the tree into an application.
When a user clicks on a node I want to re-create the 'Path' from that node back to the root.
So if someone selects say 'Ducato' I want to be returned 'Trucks - Fiat - Ducato' Similarly if you picked a node that was not the final leaf it would also work. For example selecting 'Audi' would return 'Cars - Audi'
![thickey_1-1631806721454.png thickey_1-1631806721454.png](https://community.jmp.com/t5/image/serverpage/image-id/35874i9128D27CD2EB6E00/image-dimensions/184x347?v=v2)
I can get a list of roots or the text of the item selected
show((myDirTree << Get Selected) << getLabel);
show((myDirTree << getRoots) << getLabel);
And I can run a script when a selection is made.
myTree << setNodeSelectScript(
show((myTree << Get Selected) << getLabel);
show((myTree << Get Roots) << getLabel)
);
But I do not know how to get the 'path' back to the root each node takes........
Cheers, Troy