toolbar frame(selfcursor='hand 'relief=sunkenbd= toolbar pack(side=bottomfill=xbutton(toolbartext='quit'command=self quit pack(side=rightbutton(toolbartext='hello'command=self greetingpack(side=leftdef makemenubar(self)self menubar menu(self masterself master config(menu=self menubarself filemenu(self editmenu(self imagemenu(master=top-level window def filemenu(self)pulldown menu(self menubarpulldown add_command(label='open 'command=self notdonepulldown add_command(label='quit'command=self quitself menubar add_cascade(label='file'underline= menu=pulldowndef editmenu(self)pulldown menu(self menubarpulldown add_command(label='paste'command=self notdonepulldown add_command(label='spam'command=self greetingpulldown add_separator(pulldown add_command(label='delete'command=self greetingpulldown entryconfig( state=disabledself menubar add_cascade(label='edit'underline= menu=pulldowndef imagemenu(self)photofiles ('ora-lp gif''pythonpowered gif''python_conf_ora gif'pulldown menu(self menubarself photoobjs [for file in photofilesimg photoimage(file=/gifs/filepulldown add_command(image=imgcommand=self notdoneself photoobjs append(imgkeep reference self menubar add_cascade(label='image'underline= menu=pulldowndef greeting(self)showinfo('greeting''greetings'def notdone(self)showerror('not implemented''not yet available'def quit(self)if askyesno('verify quit''are you sure you want to quit?')frame quit(selfif __name__ ='__main__'newmenudemo(mainloop(if ' run as script when runthis script generates the scene in figure - at first figure - shows this window after being stretched bitwith its image menu torn off and its edit menu selected the toolbar at the bottom grows horizontally with the window but not vertically for emphasisthis script also sets the cursor to change to hand when moved over the toolbar at the bottom run this on your own to get better feel for its behavior tkinter tourpart