473,395 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 1030
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Christoph Lehmann | last post by:
Hi I am a newbie and have a very simple python code, doing some calculations. maybe there is one already having a code snippet in wxPython for what I need: (i) simple dialog box, where the...
37
by: Ubaidullah Nubar | last post by:
Hi, How well is Python suited for developing database based applications? I am new to Python so please bear with me if some of the questions are too simple. I specifically have the following...
6
by: Logan | last post by:
Would you recommend to use the wx package of wxPython? From the documentation: Provides a way to drop the wx prefix from wxPython objects by dynamically loading and renaming objects from the...
1
by: wang xiaoyu | last post by:
Hello: i want use activex in wxpython program,but when i use MakeActiveXClass an exception occurs. this is my source code dealing the DICOM ocx.I must note that in this program "hwtxcontrol" is...
3
by: Equis Uno | last post by:
Hi, I'm trying to run some Python software I downloaded off of sf.net. It's called Boa. It uses wxPython. It appears my install of Python cannot see my install of wxPython.
3
by: omission9 | last post by:
Any advice on the following would be much appreciated. I have thrown everything I have at it and am completely stumped. I apologize for the length, I have tried to be as succint as possible. I...
2
by: Randall Smith | last post by:
When I had been programming for a few years, I realised that as much as a love to learn, I can only explore and be proficient at a limited subset of technologies. I explored different languages to...
3
by: writeson | last post by:
Hi all, I'm trying to use wxPython from a fairly new installation of Fedora Core 5. I installed wxPython using yum -y install wxPython and that all seemed to work fine. However, when I run...
25
by: Daniel Jonsson | last post by:
So, I've reached the point where my building pipeline tools actually needs to be used by other people in my company. By this reason I actually need to think about the usability, and I've come to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.