optionsclicking on the third "statebutton fetches and prints the current values displayed in the first two example - pp \gui\tour\optionmenu py from tkinter import root tk(var stringvar(var stringvar(opt optionmenu(rootvar 'spam''eggs''toast'opt optionmenu(rootvar 'ham''bacon''sausage'opt pack(fill=xopt pack(fill=xvar set('spam'var set('ham'def state()print(var get()var get()button(rootcommand=statetext='state'pack(root mainloop(like menubutton but shows choice linked variables figure - an optionmenu at work there are other menu-related topics that we'll skip here in the interest of space for instancescripts can add entries to system menus and can generate pop-up menus (posted in response to eventswithout an associated buttonrefer to tk and tkinter resources for more details on this front tkinter tourpart