- self.location = wxComboBox(self, wxNewId(), "", style=wxCB_DROPDOWN)
- EVT_COMBOBOX(self, self.location.GetId(), self.OnLocationSelect)
- EVT_KEY_UP(self.location, self.OnLocationKey)
- EVT_CHAR(self.location, self.IgnoreReturn)
- btnSizer.Add(self.location, 1, wxEXPAND|wxALL, 2)
+ self.location = wx.ComboBox(self, wx.NewId(), "", style=wx.CB_DROPDOWN)
+ self.Bind(wx.EVT_COMBOBOX, self.OnLocationSelect, id=self.location.GetId())
+ self.Bind(wx.EVT_KEY_UP, self.OnLocationKey, self.location)
+ self.Bind(wx.EVT_CHAR, self.IgnoreReturn, self.location)
+ btnSizer.Add(self.location, 1, wx.EXPAND|wx.ALL, 2)