473,721 Members | 2,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1039
On Oct 14, 9:00*am, azrael <jura.gro...@gm ail.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...@gm ail.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
2073
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 user can enter an integer. after closing the dialog I get this integer. nothing more (ii) similar for getting a file-name (with a file-dialog)
37
10436
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 questions: 1. Is there an example of a simple data-entry application written in Python using a GUI interface? Something like a simple address book app with a listbox displaying all addresses with the ability to add/modify/delete.
6
2195
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 real wxPython package. This is the first phase of a transition to a new style of using wxPython. For example: import wx
1
5992
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 a ocx developed my me use vc6,this ocx works fine in wxpython. but you can see i only change this ocx with a new DICOM ocx and set up eventClass,
3
2818
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
1493
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 have a pythoncard/wxPython application. The application works well except that users were reporting occasional crashes. The application would simply stop and just hang. I was able to reproduce the bug faithfully and ran the application in the...
2
1392
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 use for general purpose programming including C, C++, Java, Perl, Ruby, and Python. Of those languages, I chose to focus on Python because of many reasons including clean design, high productivity, and an intelligent, helpful community. My...
3
1725
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 Python and do this: import wx I get this:
25
2680
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 the conclusion that I need a GUI. So, which of the two packages should I learn, and which one is easier to pick up? Thanks in advance! Daniel
0
8840
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9367
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9215
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9131
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8007
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5981
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4484
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2130
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.