From e79c4165b4b80a3725d4fc965caf91bb8d695c84 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 2 Feb 2006 01:47:16 +0000 Subject: [PATCH] minor layout tweak git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/demo/Listbook.py | 1 + wxPython/demo/Notebook.py | 18 ++++++------------ wxPython/demo/Toolbook.py | 1 + wxPython/demo/Treebook.py | 1 + 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/wxPython/demo/Listbook.py b/wxPython/demo/Listbook.py index 7c92d02bd3..56617a0e79 100644 --- a/wxPython/demo/Listbook.py +++ b/wxPython/demo/Listbook.py @@ -54,6 +54,7 @@ class TestLB(wx.Listbook): 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 diff --git a/wxPython/demo/Notebook.py b/wxPython/demo/Notebook.py index 797f453e71..f25f06d74f 100644 --- a/wxPython/demo/Notebook.py +++ b/wxPython/demo/Notebook.py @@ -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() diff --git a/wxPython/demo/Toolbook.py b/wxPython/demo/Toolbook.py index 1dd87fc269..dde4cac8e0 100644 --- a/wxPython/demo/Toolbook.py +++ b/wxPython/demo/Toolbook.py @@ -61,6 +61,7 @@ class TestTB(wx.Toolbook): 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 diff --git a/wxPython/demo/Treebook.py b/wxPython/demo/Treebook.py index d69d41d5e5..509e3548df 100644 --- a/wxPython/demo/Treebook.py +++ b/wxPython/demo/Treebook.py @@ -66,6 +66,7 @@ class TestTB(wx.Treebook): 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