+ wx.StaticText(self, -1, "This example uses the wxComboBox control.", (8, 10))
+ wx.StaticText(self, -1, "Select one:", (15, 50), (75, 18))
+
+ # This combobox is created with a preset list of values.
+ cb = wx.ComboBox(
+ self, 500, "default value", (90, 50),
+ (95, -1), sampleList, wx.CB_DROPDOWN #|wxTE_PROCESS_ENTER
+ )
+
+ ##import win32api, win32con
+ ##win32api.SendMessage(cb.GetHandle(),
+ ## win32con.CB_SETHORIZONTALEXTENT,
+ ## 200, 0)
+
+ self.Bind(wx.EVT_COMBOBOX, self.EvtComboBox, cb)
+ self.Bind(wx.EVT_TEXT, self.EvtText, cb)
+ self.Bind(wx.EVT_TEXT_ENTER, self.EvtTextEnter, cb)
+ cb.Bind(wx.EVT_SET_FOCUS, self.OnSetFocus)
+ cb.Bind(wx.EVT_KILL_FOCUS, self.OnKillFocus)