Name

OptionMenu

tixOptionMenu pathName [option value...]

The tixOptionMenu command creates a new tixOptionMenu mega-widget named pathName. The tixOptionMenu class is derived from the tix-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, or acrosstop.

-state state (state, State)

Current state of the tixOptionMenu. Valid values are normal and disabled.

-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 that is popped up when the user presses the menubutton widget.

menubutton

The menubutton widget that displays the current selection.

Methods

pathName add type entryName [option value...]

Add a new entry to the tixOptionMenu named entryName.Type must be either command or separator. The options are any of the valid options for a menu entry of the given type, except -command

pathName delete entryName

Delete the entry entryName from the tixOptionMenu.

pathName disable entryName

Disable the entry entryName.

pathName enable entryName

Enable the entry entryName.

pathName entrycget entryName option

Similar to the cget method, but operates on the entry entryName.Option may have any of the values accepted by the add method.

pathName entryconfigure entryName [option value...]

Similar to the configure method, but operates on the entry entryName.Option may have any of the values accepted by the add method.

pathName entries

Return a list of the names of all entries in the tixOptionMenu.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset