]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxCheckListBox.py
Added a couple more numeric character references
[wxWidgets.git] / wxPython / demo / wxCheckListBox.py
1
2 from wxPython.wx import *
3
4 #----------------------------------------------------------------------
5
6 class TestPanel(wxPanel):
7 def __init__(self, parent, log):
8 wxPanel.__init__(self, parent, -1)
9 self.log = log
10
11 sampleList = ['zero', 'one', 'two', 'three', 'four', 'five',
12 'six', 'seven', 'eight', 'nine', 'ten', 'eleven',
13 'twelve', 'thirteen', 'fourteen']
14
15 wxStaticText(self, -1, "This example uses the wxCheckListBox control.",
16 wxPoint(45, 15))
17
18 lb = wxCheckListBox(self, 60, wxPoint(80, 50), wxSize(80, 120),
19 sampleList)
20 EVT_LISTBOX(self, 60, self.EvtListBox)
21 EVT_LISTBOX_DCLICK(self, 60, self.EvtListBoxDClick)
22 lb.SetSelection(0)
23
24
25 def EvtListBox(self, event):
26 self.log.WriteText('EvtListBox: %s\n' % event.GetString())
27
28 def EvtListBoxDClick(self, event):
29 self.log.WriteText('EvtListBoxDClick:\n')
30
31
32
33 #----------------------------------------------------------------------
34
35 def runTest(frame, nb, log):
36 win = TestPanel(nb, log)
37 return win
38
39 #----------------------------------------------------------------------
40
41
42
43
44
45
46
47
48
49
50 overview = """\
51 """
52
53