PyDocs

Nav

Graphical user interfaces with Tk

OptionMenu

  • OptionMenu(master, variable, default=None, *values, **kwargs)
Ttk OptionMenu widget, a Menubutton that pops up a menu of mutually exclusive choices. variable is the variable that tracks the currently selected value, default is the value to set initially, and values are the entries to display in the menu. A command keyword argument may be given to specify a callable that is invoked with the selected value whenever the selection changes; the style keyword argument sets the style used by the underlying menubutton; the direction keyword argument sets where the menu is posted relative to the menubutton (one of 'above', 'below' (the default), 'left', 'right' or 'flush'); and the name keyword argument sets the Tk widget name.
Changed in 3.14
  • 3.14: Added support for the name keyword argument.
Members of OptionMenu

d

destroy
Destroy this widget and its associated menu.

s

set_menu
Replace the entries of the menu with values.
0 Examples
No examples for tkinter.ttk/OptionMenu.
See Also
No see-alsos for tkinter.ttk/OptionMenu
0 Notes
No notes for OptionMenu