class MenuDemo(Frame): def __init__(self, parent=None): Frame.__init__(self, parent) self.pack(expand=YES, fill=BOTH) self.createWidgets()
def createWidgets(self): self.makeMenuBar() self.makeToolBar() L = Label(self, text='Menu and Toolbar demo') L.config(relief=SUNKEN, width=40, height=10, bg='white') L.pack(expand=YES, fill=BOTH) def makeMenuBar(self): self.menubar = Menu(self.master) #here self.master.config(menu=self.menubar) #here self.fileMenu() self.editMenu() self.imageMenu() why i need to use self.master? why i cant just use self? thx -- http://mail.python.org/mailman/listinfo/python-list