minor layout tweak
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -54,6 +54,7 @@ class TestLB(wx.Listbook):
|
|||||||
win = ColorPanel.ColoredPanel(p, color)
|
win = ColorPanel.ColoredPanel(p, color)
|
||||||
p.win = win
|
p.win = win
|
||||||
def OnCPSize(evt, win=win):
|
def OnCPSize(evt, win=win):
|
||||||
|
win.SetPosition((0,0))
|
||||||
win.SetSize(evt.GetSize())
|
win.SetSize(evt.GetSize())
|
||||||
p.Bind(wx.EVT_SIZE, OnCPSize)
|
p.Bind(wx.EVT_SIZE, OnCPSize)
|
||||||
return p
|
return p
|
||||||
|
@@ -62,17 +62,11 @@ class TestNB(wx.Notebook):
|
|||||||
win = self.makeColorPanel(wx.CYAN)
|
win = self.makeColorPanel(wx.CYAN)
|
||||||
self.AddPage(win, "Cyan")
|
self.AddPage(win, "Cyan")
|
||||||
|
|
||||||
# win = self.makeColorPanel(wxWHITE)
|
win = self.makeColorPanel(wx.NamedColour('Midnight Blue'))
|
||||||
# self.AddPage(win, "White")
|
self.AddPage(win, "Midnight Blue")
|
||||||
|
|
||||||
# win = self.makeColorPanel(wxBLACK)
|
win = self.makeColorPanel(wx.NamedColour('Indian Red'))
|
||||||
# self.AddPage(win, "Black")
|
self.AddPage(win, "Indian Red")
|
||||||
|
|
||||||
win = self.makeColorPanel(wx.NamedColour('MIDNIGHT BLUE'))
|
|
||||||
self.AddPage(win, "MIDNIGHT BLUE")
|
|
||||||
|
|
||||||
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_CHANGED, self.OnPageChanged)
|
||||||
self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGING, self.OnPageChanging)
|
self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGING, self.OnPageChanging)
|
||||||
@@ -82,13 +76,13 @@ class TestNB(wx.Notebook):
|
|||||||
p = wx.Panel(self, -1)
|
p = wx.Panel(self, -1)
|
||||||
win = ColorPanel.ColoredPanel(p, color)
|
win = ColorPanel.ColoredPanel(p, color)
|
||||||
p.win = win
|
p.win = win
|
||||||
|
|
||||||
def OnCPSize(evt, win=win):
|
def OnCPSize(evt, win=win):
|
||||||
|
win.SetPosition((0,0))
|
||||||
win.SetSize(evt.GetSize())
|
win.SetSize(evt.GetSize())
|
||||||
|
|
||||||
p.Bind(wx.EVT_SIZE, OnCPSize)
|
p.Bind(wx.EVT_SIZE, OnCPSize)
|
||||||
return p
|
return p
|
||||||
|
|
||||||
|
|
||||||
def OnPageChanged(self, event):
|
def OnPageChanged(self, event):
|
||||||
old = event.GetOldSelection()
|
old = event.GetOldSelection()
|
||||||
new = event.GetSelection()
|
new = event.GetSelection()
|
||||||
|
@@ -61,6 +61,7 @@ class TestTB(wx.Toolbook):
|
|||||||
win = ColorPanel.ColoredPanel(p, color)
|
win = ColorPanel.ColoredPanel(p, color)
|
||||||
p.win = win
|
p.win = win
|
||||||
def OnCPSize(evt, win=win):
|
def OnCPSize(evt, win=win):
|
||||||
|
win.SetPosition((0,0))
|
||||||
win.SetSize(evt.GetSize())
|
win.SetSize(evt.GetSize())
|
||||||
p.Bind(wx.EVT_SIZE, OnCPSize)
|
p.Bind(wx.EVT_SIZE, OnCPSize)
|
||||||
return p
|
return p
|
||||||
|
@@ -66,6 +66,7 @@ class TestTB(wx.Treebook):
|
|||||||
win = ColorPanel.ColoredPanel(p, color)
|
win = ColorPanel.ColoredPanel(p, color)
|
||||||
p.win = win
|
p.win = win
|
||||||
def OnCPSize(evt, win=win):
|
def OnCPSize(evt, win=win):
|
||||||
|
win.SetPosition((0,0))
|
||||||
win.SetSize(evt.GetSize())
|
win.SetSize(evt.GetSize())
|
||||||
p.Bind(wx.EVT_SIZE, OnCPSize)
|
p.Bind(wx.EVT_SIZE, OnCPSize)
|
||||||
return p
|
return p
|
||||||
|
Reference in New Issue
Block a user