X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/95bfd958bda8955ac81277c78e5627c926154f39..42f8298f6f42d5d63bb3caf65682b7d9d9f8b702:/wxPython/demo/Listbook.py diff --git a/wxPython/demo/Listbook.py b/wxPython/demo/Listbook.py index c17359a4be..995c25aa12 100644 --- a/wxPython/demo/Listbook.py +++ b/wxPython/demo/Listbook.py @@ -1,6 +1,4 @@ -import sys - import wx import ColorPanel @@ -36,10 +34,9 @@ class TestLB(wx.Listbook): ) self.log = log - # make an image list using the BlomXX images il = wx.ImageList(32, 32) - for x in range(1, 15): + for x in range(1, 16): f = getattr(images, 'getBlom%02dBitmap' % x) bmp = f() il.Add(bmp) @@ -61,11 +58,9 @@ class TestLB(wx.Listbook): #st.SetForegroundColour(wxWHITE) #st.SetBackgroundColour(wxBLUE) first = False - - - wx.EVT_LISTBOOK_PAGE_CHANGED(self, self.GetId(), self.OnPageChanged) - wx.EVT_LISTBOOK_PAGE_CHANGING(self, self.GetId(), self.OnPageChanging) + self.Bind(wx.EVT_LISTBOOK_PAGE_CHANGED, self.OnPageChanged) + self.Bind(wx.EVT_LISTBOOK_PAGE_CHANGING, self.OnPageChanging) def makeColorPanel(self, color): @@ -115,6 +110,7 @@ wx.ListCtrl instead of a set of tabs. 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:]) +