X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/299647acac7960652aadb008775429c1f8ea9b8d..05e00ac5ef410707da86d98786cbb268100a7337:/wxPython/demo/CheckListBox.py diff --git a/wxPython/demo/CheckListBox.py b/wxPython/demo/CheckListBox.py index ef80a7637b..72a0d66ab3 100644 --- a/wxPython/demo/CheckListBox.py +++ b/wxPython/demo/CheckListBox.py @@ -1,8 +1,3 @@ -# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net) -# -# o Updated for wx namespace -# o Why is there a popup menu in this demo? -# import wx @@ -19,15 +14,15 @@ class TestPanel(wx.Panel): wx.StaticText(self, -1, "This example uses the wxCheckListBox control.", (45, 15)) - lb = wx.CheckListBox(self, 60, (80, 50), (80, 120), sampleList) - self.Bind(wx.EVT_LISTBOX, self.EvtListBox, id=60) - self.Bind(wx.EVT_LISTBOX_DCLICK, self.EvtListBoxDClick, id=60) + lb = wx.CheckListBox(self, -1, (80, 50), (80, 120), sampleList) + self.Bind(wx.EVT_LISTBOX, self.EvtListBox, lb) + self.Bind(wx.EVT_LISTBOX_DCLICK, self.EvtListBoxDClick, lb) lb.SetSelection(0) self.lb = lb pos = lb.GetPosition().x + lb.GetSize().width + 25 btn = wx.Button(self, -1, "Test SetString", (pos, 50)) - self.Bind(wx.EVT_BUTTON, self.OnTestButton, id=btn.GetId()) + self.Bind(wx.EVT_BUTTON, self.OnTestButton, btn) self.Bind(wx.EVT_RIGHT_UP, self.OnDoPopup) def EvtListBox(self, event): @@ -88,5 +83,5 @@ labels dynamically. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])