Open N46AN opened 7 years ago
Basic info wxver - 3.0.3.dev2864+4fc5f9e gtk2 (phoenix) pyver - Python 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170118] on linux os-release - Debian GNU/Linux 9 (stretch)
Step to reproduce
import wx class MainFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, parent=None, title='test') self.pnl = wx.Panel(parent=self) self.btn = wx.Button(parent=self.pnl, label='test') self.cb_test = wx.CheckBox(parent=self.pnl, label='test', style=wx.ALIGN_RIGHT) self.cb_test.Bind(wx.EVT_SET_FOCUS, self.onSetFocus) self.cb_test.Bind(wx.EVT_KILL_FOCUS, self.onKillFocus) self.bs = wx.BoxSizer(wx.HORIZONTAL) self.bs.Add(self.btn) self.bs.Add(self.cb_test) self.pnl.SetSizer(self.bs) def onSetFocus(self, event): print('wxEVT_SET_FOCUS') def onKillFocus(self, event): print('wxEVT_KILL_FOCUS') app = wx.App() frame = MainFrame() frame.Show(True) app.MainLoop()
This is likely a wxWidgets bug. Please create an issue for it at http://trac.wxwidgets.org/
Basic info wxver - 3.0.3.dev2864+4fc5f9e gtk2 (phoenix) pyver - Python 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170118] on linux os-release - Debian GNU/Linux 9 (stretch)
Step to reproduce