Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tk_optionmenu(n) [suse man page]

tk_optionMenu(n)					       Tk Built-In Commands						  tk_optionMenu(n)

__________________________________________________________________________________________________________________________________________________

NAME
tk_optionMenu - Create an option menubutton and its menu SYNOPSIS
tk_optionMenu pathName varName value ?value value ...? _________________________________________________________________ DESCRIPTION
This procedure creates an option menubutton whose name is pathName, plus an associated menu. Together they allow the user to select one of the values given by the value arguments. The current value will be stored in the global variable whose name is given by varName and it will also be displayed as the label in the option menubutton. The user can click on the menubutton to display a menu containing all of the values and thereby select a new value. Once a new value is selected, it will be stored in the variable and appear in the option menubut- ton. The current value can also be changed by setting the variable. The return value from tk_optionMenu is the name of the menu associated with pathName, so that the caller can change its configuration options or manipulate it in other ways. EXAMPLE
tk_optionMenu .foo myVar Foo Bar Boo Spong Wibble pack .foo KEYWORDS
option menu Tk 4.0 tk_optionMenu(n)

Check Out this Related Man Page

ttk::menubutton(n)						 Tk Themed Widget						ttk::menubutton(n)

__________________________________________________________________________________________________________________________________________________

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 -compound -cursor -image -state -style -takefocus -text -textvariable -underline -width See the ttk_widget manual entry for details on the standard options. WIDGET-SPECIFIC OPTIONS [-direction 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. [-menu menu] Specifies the path name of the menu asso- ciated 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 cget, configure, identify, instate, and state methods. No other widget methods are used. SEE ALSO
ttk::widget(n), menu(n), menubutton(n) KEYWORDS
widget, button, menu Tk 8.5 ttk::menubutton(n)
Man Page