First of all, apologies for sending this request one more time and not
replying in time. I thought it did not come to this mailing list. And I
was checking several times. Novice mistake.
It works!
You don't bind the menu event to a handler until after you popup the
menu. self.PopupMenu is modal so it doesn't return until after a menu
item has been selected or the menu has been dismissed. So you need to
bind the menu event handlers before you popup the menu, and you probably
only want to bind them once otherwise you'll be adding a new binding to
the event table each time you show the menu.
No I fully understand why my app behaved so weirdly. And I also understand the meaning of the
code in Demo application. It was there!
def OnRightClick(self, event):
self.log.WriteText("OnRightClick\n")
# only do this part the first time so the events are only bound once
if not hasattr(self, "popupID1"):
self.popupID1 = wx.NewId()
Which platform and version?
To the bug:
Version:
from wxPython.wx import wxVERSION
print wxVERSION
(2, 5, 3, 2, 'pre')
Platform:
vronskij@spartan:~$ uname -a
Linux spartan 2.6.10-5-386 #1 Tue Apr 5 12:12:40 UTC 2005 i686 GNU/Linux
(Ubuntu Linux)
I booted into the Windows XP system and have tried the code there. Version 2.5.5.1. Here I could not
even change the wxNotebook position. Here it might be my error, cause I do not program in windows that much.
Last change in wxNotebook was in 2.5.5.1 version as per recent changes record.