0

Hi! :)

As said in the title i try to get (as a string) the parent of a selected item, but i can't manage to do it.

Of course i can easily retrieve the string of the selected item with GetItemText... But how do we retrieve its parent?

Example: if the selected item is a child of parent1, how can i know that its parent is parent1?

Thanks for your help!!

2
Contributors
2
Replies
4
Views
6 Years
Discussion Span
Last Post by stefh
0

Hi richieking,

thanks for your answer!

I finally find how to do it:

item =  self.tree.GetSelection()
parent = self.tree.GetItemParent(item)
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.