X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5523df9f4b4fae15ab3f60b9f7bd11202e237f81..30e24d9dd5a5abf1c9a375ea259eb239b122b7f7:/wxPython/demo/Notebook.py diff --git a/wxPython/demo/Notebook.py b/wxPython/demo/Notebook.py index 3f369001f3..f25f06d74f 100644 --- a/wxPython/demo/Notebook.py +++ b/wxPython/demo/Notebook.py @@ -13,12 +13,13 @@ import images class TestNB(wx.Notebook): def __init__(self, parent, id, log): - wx.Notebook.__init__(self, parent, id, size=(21,21), - #style= - #wx.NB_TOP # | wx.NB_MULTILINE - #wx.NB_BOTTOM - #wx.NB_LEFT - #wx.NB_RIGHT + wx.Notebook.__init__(self, parent, id, size=(21,21), style= + wx.BK_DEFAULT + #wx.BK_TOP + #wx.BK_BOTTOM + #wx.BK_LEFT + #wx.BK_RIGHT + # | wx.NB_MULTILINE ) self.log = log @@ -61,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) @@ -81,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()