X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6796a093c94cfb6de545594fcb625cafb7a8a4..52cd14b1c8c74a8d52d5a4ae9a31cfa1d123297a:/wxPython/demo/wxComboBox.py diff --git a/wxPython/demo/wxComboBox.py b/wxPython/demo/wxComboBox.py index b3dfc92739..13e8fced0d 100644 --- a/wxPython/demo/wxComboBox.py +++ b/wxPython/demo/wxComboBox.py @@ -1,4 +1,3 @@ -import string from wxPython.wx import * #--------------------------------------------------------------------------- @@ -16,6 +15,7 @@ class TestComboBox(wxPanel): wxPanel.__init__(self, parent, -1) sampleList = ['zero', 'one', 'two', 'three', 'four', 'five', + ##'this is a long item that needs a scrollbar...', 'six', 'seven', 'eight'] wxStaticText(self, -1, "This example uses the wxComboBox control.", @@ -24,6 +24,11 @@ class TestComboBox(wxPanel): wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 18)) cb = wxComboBox(self, 500, "default value", wxPoint(90, 50), wxSize(95, -1), sampleList, wxCB_DROPDOWN)#|wxTE_PROCESS_ENTER) + ##import win32api, win32con + ##win32api.SendMessage(cb.GetHandle(), + ## win32con.CB_SETHORIZONTALEXTENT, + ## 200, 0) + EVT_COMBOBOX(self, 500, self.EvtComboBox) EVT_TEXT(self, 500, self.EvtText) EVT_TEXT_ENTER(self, 500, self.EvtTextEnter) @@ -35,7 +40,7 @@ class TestComboBox(wxPanel): cb = wxComboBox(self, 501, "default value", wxPoint(90, 80), wxSize(95, -1), [], wxCB_SIMPLE) for item in sampleList: - cb.Append(item, string.upper(item)) + cb.Append(item, item.upper()) EVT_COMBOBOX(self, 501, self.EvtComboBox) EVT_TEXT(self, 501, self.EvtText)