wxpython同時(shí)生成兩個(gè)框架(有點(diǎn)問(wèn)題,繼續(xù)改進(jìn))
2020-03-19 20:34 作者:一心想當(dāng)網(wǎng)紅的李老師 | 我要投稿
import wx
import os
import CV2
class mainframe(wx.Frame):
? ? def __init__(self, parent):
? ? ? ? wx.Frame.__init__(self,parent,title='主界面',size=(1080,720))
? ? ? ??
? ? ? ? ? ??
class mgsframe(wx.Frame):
? ? def __init__(self, parent):
? ? ? ? wx.Frame.__init__(self,parent,title='信息輸入',size=(480,320))
? ? ? ? wx.Dialog(self, wx.ID_ANY, '管理員登陸')
? ? ? ? self.imput = wx.TextCtrl(self, -1,pos=(300,100),size=(250,30))
...
class MyApp(wx.App):
? def OnInit(self):
? ? self.myframe = mainframe(parent=None)
? ? self.myframe2 = mgsframe(parent=None)
? ? self.SetTopWindow(self.myframe)
? ? self.myframe.Show(True)
? ? self.myframe2.Show(True)
? ? return True
if __name__=='__main__':
? app = MyApp(0)
? app.MainLoop()
標(biāo)簽: