def createMenus(self):
# Creating the menubar.
menuBar = wx.MenuBar()
# Setting up the menu.
filemenu = wx.Menu()
filemenu.Append(ID_MENU_FILE_EXPORT, "Export..."," Export your SMS messages to file")
filemenu.Append(ID_MENU_FILE_IMPORT, "Import..."," Import your SMS messages from file")
filemenu.AppendSeparator()
filemenu.Append(ID_MENU_FILE_EXIT, "Close"," Close this window")
# Adding the "filemenu" to the MenuBar
menuBar.Append(filemenu,"&File")
# Adding the MenuBar to the Frame content.
self.SetMenuBar(menuBar)
#Add the menu handlers
wx.EVT_MENU(self, ID_MENU_FILE_EXPORT, self.doExport)
wx.EVT_MENU(self, ID_MENU_FILE_IMPORT, self.doImport)
wx.EVT_MENU(self, ID_MENU_FILE_EXIT, self.closeWindow)
评论列表
文章目录