wxTreeCtrl event bug only win32?

Discussion in 'Python' started by Krzysztof Kaczkowski, Aug 26, 2003.

  1. 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()
     
    Krzysztof Kaczkowski, Aug 26, 2003
    #1
    1. Advertising

  2. Krzysztof Kaczkowski

    Jarek Zgoda Guest

    Krzysztof Kaczkowski <> 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: http://zgoda.jogger.pl/
     
    Jarek Zgoda, Aug 26, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Piet
    Replies:
    1
    Views:
    823
    Josiah Carlson
    Apr 4, 2004
  2. Martin Drautzburg

    wxTreeCtrl checking for valid IDs

    Martin Drautzburg, Dec 27, 2004, in forum: Python
    Replies:
    0
    Views:
    433
    Martin Drautzburg
    Dec 27, 2004
  3. danielpm72

    How to read a wxTreeCtrl

    danielpm72, Apr 5, 2005, in forum: Python
    Replies:
    0
    Views:
    417
    danielpm72
    Apr 5, 2005
  4. wxTreeCtrl Q?

    , Feb 1, 2006, in forum: Python
    Replies:
    1
    Views:
    378
    Raven
    Feb 1, 2006
  5. eC
    Replies:
    0
    Views:
    342
Loading...

Share This Page