Name
OptionMenu
- tixOptionMenu
pathName
[option value
...] The tixOptionMenu command creates a new tixOptionMenu mega-widget named
pathName
. ThetixOptionMenu
class is derived from thetix-LabelWidget
class. It provides a method for the user to select an option from a pop-up menu.
Widget-Specific Options
- -command
tclCommand
(command
,Command
) Command to call when the current value of the tixOptionMenu is changed. The filename is appended as an argument.
- -disablecallback
boolean
(disableCallback
,DisableCallback
) Whether callbacks (-command) are disabled.
- -dynamicgeometry
boolean
(dynamicGeometry
,DynamicGeometry
) Whether the size of the menubutton subwidget should change dynamically to match the width of the currently selected menu entry. If
false
, its width is wide enough to contain the largest entry.- -label
string
(label
,Label
) String to display as the label of the tixOptionMenu.
- -labelside
position
(labelSide
,LabelSide
) Where to position the tixOptionMenu label. Valid values are
top
,left
,right
,bottom
,none
, oracrosstop
.- -state
state
(state
,State
) Current state of the tixOptionMenu. Valid values are
normal
anddisabled
.- -value
value
(value
,Value
) The current value of the tixOptionMenu, which is the name of the menu entry currently displayed in the menubutton subwidget.
- -variable
varName
(variable
,Variable
) Global variable that should be set to track the value of the tixOption-Menu. Direct changes to the variable will also change the value of the tixOptionMenu.
Subwidgets
menu
The menu widget ...
Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.