The Tkinter Menubutton Widget
The Menubutton widget displays popup or pulldown menu when activated.
This widget is not documented in this version of this document. If you really need it, check the Tk documentation.
When to use the Menubutton Widget
This widget is used to implement various kinds of menus. In earlier versions of Tkinter, it was used to implement toplevel menus, but this is now done with the Menu widget.
- Menubutton(master=None, **options) (class) [#]
A button used to post a menu pane.
- Parent widget.
- Widget options. See the description of the config method for a list of available options.
- config(**options) [#]
Modifies one or more widget options. If no options are given, the method returns a dictionary containing all current option values.
- Widget options.
- Default is system specific. (the database name is activeBackground, the class is Foreground)
- Default is system specific. (activeForeground/Background)
- Default is CENTER. (anchor/Anchor)
- Default is system specific. (background/Background)
- Same as background.
- No default value. (bitmap/Bitmap)
- Default is 2. (borderWidth/BorderWidth)
- Same as borderwidth.
- Default is NONE. (compound/Compound)
- No default value. (cursor/Cursor)
- Default is “below”. (direction/Direction)
- Default is system specific. (disabledForeground/DisabledForeground)
- Default is system specific. (font/Font)
- Default is system specific. (foreground/Foreground)
- Same as foreground.
- Default is 0. (height/Height)
- Default is system specific. (highlightBackground/HighlightBackground)
- Default is system specific. (highlightColor/HighlightColor)
- Default is 0. (highlightThickness/HighlightThickness)
- No default value. (image/Image)
- Default is 0. (indicatorOn/IndicatorOn)
- Default is CENTER. (justify/Justify)
- No default value. (menu/Menu)
- Default is ‘4p’. (padX/Pad)
- Default is ‘3p’. (padY/Pad)
- Default is FLAT. (relief/Relief)
- Default is NORMAL. (state/State)
- Default is 0. (takeFocus/TakeFocus)
- No default value. (text/Text)
- No default value. (textVariable/Variable)
- Default is -1 (no underline). (underline/Underline)
- Default is 0. (width/Width)
- Default is 0. (wrapLength/WrapLength)