]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/Listbook.py
warning fix
[wxWidgets.git] / wxPython / demo / Listbook.py
index 2186205cb3e7aae2e88fbbf3560c5ce20a54b940..995c25aa12e38c7711553c53efc18361f903b7b4 100644 (file)
@@ -1,19 +1,8 @@
-# 11/22/2003 - Jeff Grimmett (grimmtooth@softhome.net)
-#
-# o Updated for wx namespace
-# 
-# 11/29/2003 - Jeff Grimmett (grimmtooth@softhome.net)
-#
-# o Bunches of imports that might need to go away for the final roll-out.
-# 
-
-import  sys
 
 import  wx
 
-import images
-
 import ColorPanel
+import images
 
 colourList = [ "Aquamarine", "Black", "Blue", "Blue Violet", "Brown", "Cadet Blue",
                "Coral", "Cornflower Blue", "Cyan", "Dark Grey", "Dark Green",
@@ -45,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)
@@ -70,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):
@@ -112,10 +98,10 @@ def runTest(frame, nb, log):
 
 overview = """\
 <html><body>
-<h2>wxListbook</h2>
+<h2>wx.Listbook</h2>
 <p>
 This class is a control similar to a notebook control, but with a
-wxListCtrl instead of a set of tabs.
+wx.ListCtrl instead of a set of tabs.
 
 """
 
@@ -124,6 +110,7 @@ wxListCtrl 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:])
+