我希望有两个面板(我稍后会添加更多)在框架内占据相同的空间,并且当按下工具栏上的相应按钮时,它们将显示/隐藏,“mListPanel”应该是默认值。目前设置面板显示时,应用程序启动,按钮不做任何事。我找了好多东西,试了好几个小时,还是不能用。如果是简单的事情,我很抱歉,我今天才开始学习python。在
代码如下所示:import wx
class mListPanel(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent=parent)
#wx.StaticText(self, -1, label='Search:')#, pos=(10, 3))
#wx.TextCtrl(self, pos=(10, 10), size=(250, 50))
class settingsPanel(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent=parent)
class bifr(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, wx.ID_ANY, "Title")
self.listPanel = mListPanel(self)
self.optPanel = settingsPanel(self)
menuBar = wx.MenuBar()
fileButton = wx.Menu()
importItem