如何在一个wxpython APP里面创建两个框架呢?
代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import ... import ... class MyFrame(wx.Frame): def __init__(self): wx.Frame.__init__( ... class MyFrame2(wx.Frame): def __init__(self): wx.Frame.__init__( ... class MyApp(wx.App): def OnInit(self): self.myframe = MyFrame() self.myframe2 = MyFrame2() self.SetTopWindow(self.myframe) self.myframe.Show(True) self.myframe2.Show(True) return True if __name__=='__main__': app = MyApp(0) app.MainLoop() |