GenButton and acceleratorTable
Nicolas Pinault <[email protected]> Sun, 16 Dec 2018 18:53:33 +0100
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Using WxPython 4.x : With the following code, accelerators work correctly : self.button_p = wx.Button(self.toolbar, wx.ID_ANY, size=(32, 32)) self.button_n = wx.Button(self.toolbar, wx.ID_ANY, size=(32, 32)) accelerator_table = wx.AcceleratorTable([(wx.ACCEL_NORMAL, wx.WXK_LEFT, self.button_p.GetId()), (wx.ACCEL_NORMAL, wx.WXK_RIGHT, self.button_n.GetId())]) self.SetAcceleratorTable(accelerator_table) When replacing wx.Button() with wx.lib.buttons.GenButton(), accelerators do not work anymore. I need owner drawn buttons, hence the use of GenButton(). How can I fix this issue ? Best regards, Nicolas -- You received this message because you are subscribed to the Google Groups "wxPython-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.