469,926 Members | 2,248 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,926 developers. It's quick & easy.

Need help with Wxpython

I need to implement a tree which will append a root. Any other node in
the tree will be triggered when a button is pressed.
I created the button, all the needed events, tree and a root. But when
I want to append a node pressing the button I don't know How.

My idea is using the wx.EVT_TREE_SEL_CHANGED event somehow get The ID
or something of the selected node, so I could know Where to append the
his child. I need the ID for the appenditem method. But HOW TO GET THE
ID FOR THE PARENT.

PLEASE SOME HELP, I CAN'T FIND THE NEEDED METHOD
Oct 14 '08 #1
3 912
On Oct 14, 9:00*am, azrael <jura.gro...@gmail.comwrote:
I need to implement a tree which will append a root. Any other node in
the tree will be triggered when a button is pressed.
I created the button, all the needed events, tree and a root. But when
I want to append a node pressing the button I don't know How.

My idea is using the wx.EVT_TREE_SEL_CHANGED event somehow get The ID
or something of the selected node, so I could know Where to append the
his child. I need the ID for the appenditem method. But HOW TO GET THE
ID FOR THE PARENT.

PLEASE SOME HELP, I CAN'T FIND THE NEEDED METHOD
The demo seems to do have an example that does this. See the
"TreeMixin" under the "More Windows/Controls" section. If you don't
have the demo, you can get it here: http://wxpython.org/download.php

I recommend the wxPython mailing list for questions about wxPython
too. I'm sure someone on there could tell you how to do it without the
mixin: http://wxpython.org/maillist.php

Mike
Oct 14 '08 #2
Seen it already but looks to complicated. Someone knows a better way?
Oct 14 '08 #3
On Oct 14, 9:36*am, azrael <jura.gro...@gmail.comwrote:
Seen it already but looks to complicated. Someone knows a better way?
What about the tree control's GetSelection method? That seems to
return the TreeItemId.

Mike
Oct 14 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Christoph Lehmann | last post: by
37 posts views Thread by Ubaidullah Nubar | last post: by
6 posts views Thread by Logan | last post: by
1 post views Thread by wang xiaoyu | last post: by
3 posts views Thread by Equis Uno | last post: by
2 posts views Thread by Randall Smith | last post: by
3 posts views Thread by writeson | last post: by
25 posts views Thread by Daniel Jonsson | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.