cb.Bind(wx.EVT_SET_FOCUS, self.OnSetFocus)
cb.Bind(wx.EVT_KILL_FOCUS, self.OnKillFocus)
- # Once the combobox is set up, we append some more data to it.
+ # Once the combobox is set up, we can append some more data to it.
cb.Append("foo", "This is some client data for this item")
# This combobox is created with no values initially.
cb = wx.ComboBox(
- self, 501, "default value", (90, 80), (95, -1), [], wx.CB_SIMPLE)
+ self, 501, "default value", (90, 80), (95, -1), [], wx.CB_DROPDOWN)
# Here we dynamically add our values to the second combobox.
for item in sampleList:
self.Bind(wx.EVT_COMBOBOX, self.EvtComboBox, cb)
self.Bind(wx.EVT_COMBOBOX, self.EvtText, cb)
- # The user selects something, we go here.
+ # When the user selects something, we go here.
def EvtComboBox(self, evt):
cb = evt.GetEventObject()
data = cb.GetClientData(cb.GetSelection())
if __name__ == '__main__':
import sys,os
import run
- run.main(['', os.path.basename(sys.argv[0])])
+ run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])