projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't crash on unterminated CDATA elements (patch #1117629)
[wxWidgets.git]
/
wxPython
/
demo
/
ComboBox.py
diff --git
a/wxPython/demo/ComboBox.py
b/wxPython/demo/ComboBox.py
index 04337e661cf394569beb00f63570a82932127701..4ab15a6467f257830acbd271bfe97a26420f86ea 100644
(file)
--- a/
wxPython/demo/ComboBox.py
+++ b/
wxPython/demo/ComboBox.py
@@
-35,12
+35,12
@@
class TestComboBox(wx.Panel):
cb.Bind(wx.EVT_SET_FOCUS, self.OnSetFocus)
cb.Bind(wx.EVT_KILL_FOCUS, self.OnKillFocus)
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(
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:
# Here we dynamically add our values to the second combobox.
for item in sampleList:
@@
-49,7
+49,7
@@
class TestComboBox(wx.Panel):
self.Bind(wx.EVT_COMBOBOX, self.EvtComboBox, cb)
self.Bind(wx.EVT_COMBOBOX, self.EvtText, cb)
self.Bind(wx.EVT_COMBOBOX, self.EvtComboBox, cb)
self.Bind(wx.EVT_COMBOBOX, self.EvtText, cb)
- #
T
he user selects something, we go here.
+ #
When t
he user selects something, we go here.
def EvtComboBox(self, evt):
cb = evt.GetEventObject()
data = cb.GetClientData(cb.GetSelection())
def EvtComboBox(self, evt):
cb = evt.GetEventObject()
data = cb.GetClientData(cb.GetSelection())
@@
-103,5
+103,5
@@
event is generated every time that the user hits a key in the ComboBox entry fie
if __name__ == '__main__':
import sys,os
import run
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:]
)