0
當我創建一個BoxSizer這樣的:BoxSizer在框架和麪板
class MyForm(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, wx.ID_ANY,
"App",size=(800,600),style= wx.SYSTEM_MENU | wx.CAPTION | wx.MINIMIZE_BOX | wx.CLOSE_BOX)
self.panel=wx.Panel(self,size=(800,600))
# create BoxSizer and fill it with elements
它的工作原理。 但是當我這樣做:
class MyForm(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, wx.ID_ANY,
"App",size=(800,600),style= wx.SYSTEM_MENU | wx.CAPTION | wx.MINIMIZE_BOX | wx.CLOSE_BOX)
panelThree(self)
class panelThree(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent=parent,size=(800,600))
self.panel=wx.Panel(self,size=(800,600))
# create BoxSizer and fill it with elements
那麼不順心的事:所有元素都位於左上角,他們相互重疊。當我想在我的課堂上使用BoxSizer時,如何使用BoxSizer panelThree? 我剛剛從這裏舉了個例子:http://wiki.wxpython.org/BoxSizerTutorial