- b = wxToggleButton(panel, -1, word)
- EVT_TOGGLEBUTTON(self, b.GetId(), self.OnToggle)
- buttons.Add(b, flag=wxALL, border=5)
+ b = wx.ToggleButton(panel, -1, word)
+ self.Bind(wx.EVT_TOGGLEBUTTON, self.OnToggle, b)
+ buttons.Add(b, flag=wx.ALL, border=5)