class MainPanel(wx.Panel):##main frame
""""""
#----------------------------------------------------------------------
def __init__(self, parent, size = (5000,5000)):
"""Constructor"""
wx.Panel.__init__(self, parent=parent, size = (5000,5000))
self.frame = parent
Publisher().subscribe(self.showFrame, ("show.mainframe"))
##create menubar
menu=wx.MenuBar()
file0 = wx.Menu()
help0 = wx.Menu()
rules = wx.Menu()
Closed = file0.Append(wx.NewId(),"Quit")
parent.Bind(wx.EVT_MENU,self.close,Closed)
def close(self,event):
self.Close()
我想做的是,当您从菜单项中按退出时。它关闭了整个程序,但目前它似乎没有做任何事情。我如何编辑我的代码以关闭整个程序