Need help with Wxpython

Mike Driscoll kyosohma at gmail.com
Tue Oct 14 10:27:42 EDT 2008


On Oct 14, 9:00 am, azrael <jura.gro... at gmail.com> wrote:
> 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



More information about the Python-list mailing list