]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/demo/wxCheckListBox.py
2 from wxPython
.wx
import *
4 #----------------------------------------------------------------------
6 class TestPanel(wxPanel
):
7 def __init__(self
, parent
, log
):
8 wxPanel
.__init
__(self
, parent
, -1)
11 sampleList
= ['zero', 'one', 'two', 'three', 'four', 'five',
12 'six', 'seven', 'eight', 'nine', 'ten', 'eleven',
13 'twelve', 'thirteen', 'fourteen']
15 wxStaticText(self
, -1, "This example uses the wxCheckListBox control.",
18 lb
= wxCheckListBox(self
, 60, wxPoint(80, 50), wxSize(80, 120),
20 EVT_LISTBOX(self
, 60, self
.EvtListBox
)
21 EVT_LISTBOX_DCLICK(self
, 60, self
.EvtListBoxDClick
)
25 def EvtListBox(self
, event
):
26 self
.log
.WriteText('EvtListBox: %s\n' % event
.GetString())
28 def EvtListBoxDClick(self
, event
):
29 self
.log
.WriteText('EvtListBoxDClick:\n')
33 #----------------------------------------------------------------------
35 def runTest(frame
, nb
, log
):
36 win
= TestPanel(nb
, log
)
39 #----------------------------------------------------------------------