Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > wxTreeCtrl event bug only win32?

Reply
Thread Tools

wxTreeCtrl event bug only win32?

 
 
Krzysztof Kaczkowski
Guest
Posts: n/a
 
      08-26-2003
Hello
Im having problem, wxTreeCtrl generate 3 x EVT_TREE_SEL_CHANGED on click
item right button mouse. This problem only win32. Why?


Simple example:

from wxPython.wx import *
class MyApp(wxApp):
def OnInit(self):
frame = wxFrame(NULL, -1, "wxPython",
wxDefaultPosition,wxSize(200,150))
frame.Show(true)
self.nr = 0
self.SetTopWindow(frame)
self.ID_TREE = wxNewId()
self.tree = wxTreeCtrl(frame, self.ID_TREE)
root = self.tree.AddRoot('root test event')
itm = self.tree.AppendItem(root, 'Right click first item')
itm = self.tree.AppendItem(root, 'Right click next item')
EVT_TREE_SEL_CHANGED (self, self.ID_TREE, self.ItemChanged)
return True

def ItemChanged(self, event):
self.nr += 1
print self.nr

app = MyApp(0)
app.MainLoop()




 
Reply With Quote
 
 
 
 
Jarek Zgoda
Guest
Posts: n/a
 
      08-26-2003
Krzysztof Kaczkowski <(E-Mail Removed)> pisze:

> Im having problem, wxTreeCtrl generate 3 x EVT_TREE_SEL_CHANGED on click
> item right button mouse. This problem only win32. Why?


Maybe you should subscribe wxpython-users list and ask this question
there? I'm pretty sure, that you will find much broader audience than
here. And of course Robin Dunn also subscribes this list...

--
Jarek Zgoda
Registered Linux User #-1
http://www.zgoda.biz/ JID:(E-Mail Removed) http://zgoda.jogger.pl/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is this a wxPython 2.8.0 bug with GetItemText method of wxTreeCtrl? eC Python 0 04-01-2007 10:42 PM
wxTreeCtrl Q? mitsura@skynet.be Python 1 02-01-2006 01:26 PM
How to read a wxTreeCtrl danielpm72 Python 0 04-05-2005 08:32 AM
wxTreeCtrl checking for valid IDs Martin Drautzburg Python 0 12-27-2004 11:37 PM
Recursively expand all branches ox wxTreeCtrl Piet Python 1 04-04-2004 06:40 PM



Advertisments