How to read a wxTreeCtrl

D

danielpm72

Hi,

I want to read a wxTreeCtrl from the root since I want to store all
the information in it in a python dictionary. I know that the methods
I have to use are ItemHasChildren, GetFirstChild and GetNextChild and
I have been success in getting the first node in this manner:

while child.IsOk():
print wx.TreeCtrl.GetItemText ( self, child )
if wx.TreeCtrl.ItemHasChildren ( self, child ):
(child, cookie) = wx.TreeCtrl.GetNextChild( self,
child, cookie )
else:
(child, cookie) = wx.TreeCtrl.GetNextChild( self,
child, cookie )

my problem is that each one of this nodes has others children whose
has its values. How can I read more that one level?

Thanks in advance,


Daniel del Pozo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top