Reputation: 559
How do i get the full path of a selected node in a treeview?
I use:
curItem = tree.focus()
item_list = tree.item(curItem)
But this only gives me the node i selected not the name of the "master" node.
I use the Treeview do Display the data in a Folder.
Folder_1
I want "Folder_1\File.txt" as a result."
Upvotes: 0
Views: 1283
Reputation: 559
Found it:
item_iid = tree.selection()[0]
parent_iid = tree.parent(item_iid)
node = tree.item(parent_iid)['text']
Upvotes: 2