import wx class Page(wx.Panel): def __init__(self, *args, **kw): wx.Panel.__init__(self, *args, **kw) b1 = wx.Button(self, -1, "button one") b2 = wx.Button(self, -1, "button two") self.Sizer = wx.BoxSizer(wx.VERTICAL) self.Sizer.Add(b1, 0, wx.ALL, 20) self.Sizer.Add(b2, 0, wx.ALL, 20) class Frame(wx.Frame): def __init__(self, *args, **kw): wx.Frame.__init__(self, *args, **kw) nb = wx.Notebook(self) nb.AddPage(Page(nb), "page one") nb.AddPage(Page(nb), "page two") nb.AddPage(Page(nb), "page three") app = wx.App(redirect=False) frm = Frame(None, title="Simple Sample") frm.Show() app.MainLoop()