]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/Notebook.py
Warning fixes and source cleaning.
[wxWidgets.git] / wxPython / demo / Notebook.py
index 797f453e715981569674e05370f057422914892a..f25f06d74f935d28d4f81847dfc1ff309b46a8b6 100644 (file)
@@ -62,17 +62,11 @@ class TestNB(wx.Notebook):
         win = self.makeColorPanel(wx.CYAN)
         self.AddPage(win, "Cyan")
 
-#         win = self.makeColorPanel(wxWHITE)
-#         self.AddPage(win, "White")
+        win = self.makeColorPanel(wx.NamedColour('Midnight Blue'))
+        self.AddPage(win, "Midnight Blue")
 
-#         win = self.makeColorPanel(wxBLACK)
-#         self.AddPage(win, "Black")
-
-        win = self.makeColorPanel(wx.NamedColour('MIDNIGHT BLUE'))
-        self.AddPage(win, "MIDNIGHT BLUE")
-
-        win = self.makeColorPanel(wx.NamedColour('INDIAN RED'))
-        self.AddPage(win, "INDIAN RED")
+        win = self.makeColorPanel(wx.NamedColour('Indian Red'))
+        self.AddPage(win, "Indian Red")
 
         self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnPageChanged)
         self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGING, self.OnPageChanging)
@@ -82,13 +76,13 @@ class TestNB(wx.Notebook):
         p = wx.Panel(self, -1)
         win = ColorPanel.ColoredPanel(p, color)
         p.win = win
-
         def OnCPSize(evt, win=win):
+            win.SetPosition((0,0))
             win.SetSize(evt.GetSize())
-
         p.Bind(wx.EVT_SIZE, OnCPSize)
         return p
 
+
     def OnPageChanged(self, event):
         old = event.GetOldSelection()
         new = event.GetSelection()