wxTreeCtrl event bug only win32?

  • Thread starter Krzysztof Kaczkowski
  • Start date
K

Krzysztof Kaczkowski

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()
 
J

Jarek Zgoda

Krzysztof Kaczkowski said:
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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top