]>
Commit | Line | Data |
---|---|---|
be05b434 RD |
1 | import wx |
2 | ||
3 | class ComboBoxFrame(wx.Frame): | |
4 | def __init__(self): | |
5 | wx.Frame.__init__(self, None, -1, 'Combo Box Example', | |
6 | size=(350, 300)) | |
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) | |
15 | ||
16 | if __name__ == '__main__': | |
17 | app = wx.PySimpleApp() | |
18 | ComboBoxFrame().Show() | |
19 | app.MainLoop() |