wx.treectrl strategy to select a node

Hi all,
wath is your approach when you need, opening a frame, to select a specific node in a tree?
Something like
expand tree
find for example the second node
simulate the user click

beppe wrote:

Hi all,
wath is your approach when you need, opening a frame, to select a specific node in a tree?
Something like
expand tree
find for example the second node
simulate the user click

tree.EnsureVisible(treeItem)
tree.SelectItem(treeItem)

The tree item objects are returned when you add items to the tree. So you could either save the one that you want to have selected by default from when it was added, or use the tree methods that allow you to traverse the tree items from the root or from parent node to child nodes.

···

--
Robin Dunn
Software Craftsman