X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/299647acac7960652aadb008775429c1f8ea9b8d..35095c028d472a2d0b9607a9430a468765a16e3f:/wxPython/demo/CheckListBox.py diff --git a/wxPython/demo/CheckListBox.py b/wxPython/demo/CheckListBox.py index ef80a7637b..904ac1bb25 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):