]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-07/combo_box.py
3 class ComboBoxFrame(wx
.Frame
):
5 wx
.Frame
.__init
__(self
, None, -1, 'Combo Box Example',
7 panel
= wx
.Panel(self
, -1)
8 sampleList
= ['zero', 'one', 'two', 'three', 'four', 'five',
9 'six', 'seven', 'eight']
10 wx
.StaticText(panel
, -1, "Select one:", (15, 15))
11 wx
.ComboBox(panel
, -1, "default value", (15, 30), wx
.DefaultSize
,
12 sampleList
, wx
.CB_DROPDOWN
)
13 wx
.ComboBox(panel
, -1, "default value", (150, 30), wx
.DefaultSize
,
14 sampleList
, wx
.CB_SIMPLE
)
16 if __name__
== '__main__':
17 app
= wx
.PySimpleApp()
18 ComboBoxFrame().Show()