By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,525 Members | 1,623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,525 IT Pros & Developers. It's quick & easy.

How to read a wxTreeCtrl

P: n/a

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

Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.