Tcl 9.0/Tk9.0 Documentation > Tk Commands, version 9.0.0 > ttk_menubutton

Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API

NAME
ttk::menubutton — Widget that pops down a menu when pressed
SYNOPSIS
DESCRIPTION
STANDARD OPTIONS
-class, undefined, undefined
-compound, compound, Compound
-cursor, cursor, Cursor
-image, image, Image
-state, state, State
-style, style, Style
-takefocus, takeFocus, TakeFocus
-text, text, Text
-textvariable, textVariable, Variable
-underline, underline, Underline
-width, width, Width
WIDGET-SPECIFIC OPTIONS
-direction, direction, Direction
-menu, menu, Menu
WIDGET COMMAND
STANDARD STYLES
STYLING OPTIONS
SEE ALSO
KEYWORDS

NAME

ttk::menubutton — Widget that pops down a menu when pressed

SYNOPSIS

ttk::menubutton pathName ?options?

DESCRIPTION

A ttk::menubutton widget displays a textual label and/or image, and displays a menu when pressed.

STANDARD OPTIONS

-class, undefined, undefined
-compound, compound, Compound
-cursor, cursor, Cursor
-image, image, Image
-state, state, State
-style, style, Style
-takefocus, takeFocus, TakeFocus
-text, text, Text
-textvariable, textVariable, Variable
-underline, underline, Underline
-width, width, Width

WIDGET-SPECIFIC OPTIONS

Command-Line Name: -direction
Database Name: direction
Database Class: Direction
Specifies where the menu is to be popped up relative to the menubutton. One of: above, below, left, right, or flush. The default is below. flush pops the menu up directly over the menubutton.

Command-Line Name: -menu
Database Name: menu
Database Class: Menu
Specifies the path name of the menu associated with the menubutton. To be on the safe side, the menu ought to be a direct child of the menubutton.

WIDGET COMMAND

Menubutton widgets support the standard commands cget, configure, identify element, instate, state and style (see ttk::widget).

STANDARD STYLES

Ttk::menubutton widgets support the Toolbutton style in all standard themes, which is useful for creating widgets for toolbars.

STYLING OPTIONS

The class name for a ttk::menubutton is TMenubutton.

Dynamic states: active, disabled, readonly.

TMenubutton styling options configurable with ttk::style are:

-arrowsize amount
-background color
-compound compound
-foreground color
-font font
-padding padding
-relief relief
-width amount

Some options are only available for specific themes.

See the ttk::style manual page for information on how to configure ttk styles.

SEE ALSO

ttk::widget, menu, menubutton

KEYWORDS

widget, button, menu
Copyright © 2004 Joe English