as part of another attachable component' widget package for examplethe menuembedding behavior in example - works even if the menu' parent is another frame container and not the top-level windowthis script is similar to the priorbut creates three fully functional menu bars attached to frames nested in window example - pp \gui\tour\menu_frm-multi py from menu_frm import makemenu from tkinter import can' use menu_win here--root=frame root tk(for in range( )three menus nested in the containers frm frame(mnu makemenu(frmmnu config(bd= relief=raisedfrm pack(expand=yesfill=bothlabel(frmbg='black'height= width= pack(expand=yesfill=bothbutton(roottext="bye"command=root quitpack(root mainloop(using menubuttons and optionmenus in factmenus based on menubutton are even more general than example - implies-they can actually show up anywhere on display that normal buttons cannot just within menu bar frame example - makes menubutton pull-down list that simply shows up by itselfattached to the root windowfigure - shows the gui it produces example - pp \gui\tour\mbutton py from tkinter import root tk(mbutton menubutton(roottext='food'the pull-down stands alone picks menu(mbuttonmbutton config(menu=pickspicks add_command(label='spam'command=root quitpicks add_command(label='eggs'command=root quitpicks add_command(label='bacon'command=root quitmbutton pack(mbutton config(bg='white'bd= relief=raisedroot mainloop(the related tkinter optionmenu widget displays an item selected from pull-down menu it' roughly like menubutton plus display labeland it displays menu of choices when clickedbut you must link tkinter variables (described in to fetch the choice after the fact instead of registering callbacksand menu entries are passed as arguments in the widget constructor call after the variable example - illustrates typical optionmenu usage and builds the interface captured in figure - clicking on either of the first two buttons opens pull-down menu of menus