[wxpython-users] accelerator newbie, help

Mike Driscoll mdriscoll at co.marshall.ia.us
Fri Apr 25 06:49:10 PDT 2008


Robin Dunn wrote:
> <div class="moz-text-flowed" style="font-family: -moz-fixed">Quoting 
> Phillip Watts <phillip.watts at anvilcom.com>:
>
>> I used Mike Driscoll's example of a fake menu to get some
>> id's for the accelerator table, which apparently must use
>> to get frame level keyboard events.
>
> All that's needed is an ID, (wx.NewId()) and to use the same ID in the 
> accelerator table and in the Bind statement.
>
I figured there was an easier way...and I noticed that some of the other 
guys pointed this out. In my defense, I read the following from the WIA 
book: "The cmd argument is the wxPython identifier of the menu item 
which triggers its command event when the accelerator is invoked" on 
page 310, so I assumed (incorrectly) that a menu needed to exist too.

Sorry for perpetuating my misinterpretation.

Mike


More information about the wxpython-users mailing list