VtOptionMenu(VTCL)
VtOptionMenu --
create an OptionMenu widget, return widget name
Syntax
VtOptionMenu widgetName [options]
Description
Creates an OptionMenu widget which is a menu system component
that lets a user select one of several choices. OptionMenus
are created like Pulldown menus. First the OptionMenu
is created and then it is ``filled'' in with other widgets. (The
Label class options are supported, so that the OptionMenus
can be titled.) Returns the OptionMenu widget's name.
For example, to create an OptionMenu with
the options dog, cat, and frog:
set menu [VtOptionMenu $form.menu -label "Pick one:"
set but1 [VtPushButton $menu.but1 -label dog]
set but2 [VtPushButton $menu.but2 -label cat]
set but3 [VtPushButton $menu.but3 -label frog]
Callbacks can be assigned to the individual widgets which make
up the OptionMenu, or a callback can be assigned to the
OptionMenu itself. If this is done, callbacks assigned to
the OptionMenu children will be overridden and the OptionMenu
callback will be called if any of the children are activated.
The child which caused the callback to be called will be passed
as callback data.
Options
-callback cmd (C)-
Sets callback cmd as the routine to call
when any of the options are activated (by <Space>,
<Enter>, or a single mouse click).
This callback overrides any activation callbacks assigned
to children of the option menu
Additional callback keys:
selectedWidget-
The name of the widget that activated this callback
value-
The name of the widget that activated this callback
-selectedWidget widgetName ((SG)-
Specifies the name of the widget that is selected in the option menu.
Errors
Standard errors-
See
``Tcl widget creation errors'' in SCO Visual Tcl Programmer's Guide and Reference.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003