]> git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-07/list_box.py
fix building/running of tex2rtf
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-07 / list_box.py
1 import wx
2
3 class ListBoxFrame(wx.Frame):
4 def __init__(self):
5 wx.Frame.__init__(self, None, -1, 'List Box Example',
6 size=(250, 200))
7 panel = wx.Panel(self, -1)
8
9 sampleList = ['zero', 'one', 'two', 'three', 'four', 'five',
10 'six', 'seven', 'eight', 'nine', 'ten', 'eleven',
11 'twelve', 'thirteen', 'fourteen']
12
13 listBox = wx.ListBox(panel, -1, (20, 20), (80, 120), sampleList,
14 wx.LB_SINGLE)
15 listBox.SetSelection(3)
16
17 if __name__ == '__main__':
18 app = wx.PySimpleApp()
19 ListBoxFrame().Show()
20 app.MainLoop()
21