- panel = wxPanel(self, -1)
- buttons = wxBoxSizer(wxHORIZONTAL)
- for word in string.split("These are toggle buttons"):
- b = wxToggleButton(panel, -1, word)
- EVT_TOGGLEBUTTON(self, b.GetId(), self.OnToggle)
- buttons.Add(b, flag=wxALL, border=5)
-
- panel.SetAutoLayout(true)
+ panel = wx.Panel(self, -1)
+ buttons = wx.BoxSizer(wx.HORIZONTAL)
+
+ for word in "These are toggle buttons".split():
+ b = wx.ToggleButton(panel, -1, word)
+ self.Bind(wx.EVT_TOGGLEBUTTON, self.OnToggle, b)
+ buttons.Add(b, flag=wx.ALL, border=5)
+
+ panel.SetAutoLayout(True)