X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca298c88524c5c44c38d71af0c1f8ab81543e6a9..cf694132f1c28509a9f84377ce8d374bae4177ad:/utils/wxPython/demo/wxCheckListBox.py diff --git a/utils/wxPython/demo/wxCheckListBox.py b/utils/wxPython/demo/wxCheckListBox.py new file mode 100644 index 0000000000..4727459b0c --- /dev/null +++ b/utils/wxPython/demo/wxCheckListBox.py @@ -0,0 +1,53 @@ + +from wxPython.wx import * + +#---------------------------------------------------------------------- + +class TestPanel(wxPanel): + def __init__(self, parent, log): + wxPanel.__init__(self, parent, -1) + self.log = log + + sampleList = ['zero', 'one', 'two', 'three', 'four', 'five', + 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', + 'twelve', 'thirteen', 'fourteen'] + + wxStaticText(self, -1, "This example uses the wxCheckListBox control.", + wxPoint(45, 15)) + + lb = wxCheckListBox(self, 60, wxPoint(80, 50), wxSize(80, 120), + sampleList) + EVT_LISTBOX(self, 60, self.EvtListBox) + EVT_LISTBOX_DCLICK(self, 60, self.EvtListBoxDClick) + lb.SetSelection(0) + + + def EvtListBox(self, event): + self.log.WriteText('EvtListBox: %s\n' % event.GetString()) + + def EvtListBoxDClick(self, event): + self.log.WriteText('EvtListBoxDClick:\n') + + + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = TestPanel(nb, log) + return win + +#---------------------------------------------------------------------- + + + + + + + + + + +overview = """\ +""" + +