[wxpython-users] Accelerator table and wx.NewId(): bug ?
imho
novellotto at libero.it
Sun Sep 7 09:03:31 PDT 2008
Hi all.
I just noticed that setting an entry in an accelerator table with a
custom id (an id that doesn't belong to an existing menu item) doesn't
work anymore in wxPython 2.8.8.1 (I tried it with some previous version
and it worked):
newId = wx.NewId()
self.Bind(wx.EVT_MENU, self.OnCtrlQ, id=newId)
acct = wx.AcceleratorTable([(wx.ACCEL_CTRL, ord("q"), newId)])
self.SetAcceleratorTable(acct)
self.OnCtrlQ is never called (I tried all possible variations, such as
using "Q", executing the code in __init__ or after the creation of all
child controls, and so on).
Is that a bug ? If not, is there a solution ?
Thanks in advance, Diego.
More information about the wxpython-users
mailing list