笔记本在拆分的窗口中wxpython

时间:2018-10-21 00:52:17

标签: wxpython

您好,我在拆分窗口中遇到笔记本电脑问题,我需要将窗口拆分为2。一半用笔记本电脑拆分,另一部分用简单面板拆分 你能帮我吗。 谢谢。

这是 the code

class MainFrame(wx.Frame):
def __init__(self):
    wx.Frame.__init__(self, None, title="prueba")

    self.splitter = wx.SplitterWindow(self)
    # Create a panel and notebook (tabs holder)
    p = wx.Panel(self)
    nb = wx.Notebook(p)

    # Create the tab windows
    tab1 = TabOne(nb)
    tab2 = TabTwo(nb)
    tab3 = TabThree(nb)
    tab4 = TabFour(nb)

    # Add the windows to tabs and name them.
    nb.AddPage(tab1, "Tab 1")
    nb.AddPage(tab2, "Tab 2")
    nb.AddPage(tab3, "Tab 3")
    nb.AddPage(tab4, "Tab 4")



    self.nb = wx.Panel (self.splitter)
    self.leftPanel = mainpanel (self.splitter)

    self.splitter.SplitVertically (self.leftPanel, self.nb, 100)


    # Set noteboook in a sizer to create the layout
    sizer = wx.BoxSizer()
    sizer.Add(self.splitter, 1, wx.EXPAND)
    p.SetSizer(sizer)

0 个答案:

没有答案