DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Command options by class

Button class options

Button class options apply to widgets created with VtPushButton(VTCL) and VtToggleButton(VTCL).

The following button class options are available:


-accelerator string (CS)
Sets the button widget's accelerator. (Accelerators are keystroke combinations, usually involving <Ctrl> or <Alt> keys to distinguish them from ordinary keypresses sent to the application, that invoke a menu or a menu item when the menu is not displayed.)

The accelerator string format is like that of a translation, but allows only a single keypress event to be specified. For example, to specify the accelerator <Ctrl>N, use the string Ctrl<Key>N.

To activate an accelerator in the character server, the sequence <Ctrl>A needs to be prefixed in the following manner:

Graphical mode Character mode
<Ctrl>S <Ctrl>A<Ctrl>S
<Ctrl>A <Ctrl>A<Ctrl>A
<Ctrl>R <Ctrl>A<Ctrl>R
<Alt>S <Ctrl>A-S
<Alt>A <Ctrl>A-A
<Alt>R <Ctrl>A-R


-acceleratorString string (CS)
Sets the text that is displayed for the accelerator. The string is displayed adjacent to the label string or pixmap. For example, the string used to specify <Ctrl>N as the accelerator is ``Ctrl+N.'' Accelerator text for buttons is displayed only for push buttons and toggle buttons in pulldown and popup menus.

-armedPixmap String (CS)
Specifies the name of the pixmap file or or the name of a pixmap to display in the widget when the pointer passes into the button. This option is ignored in character mode.

-callback string (CS)
Specifies the Tcl command or procedure to execute when the button is pressed. A callback structure is appended to the call.

-insensitivePixmap filename (CS)
Sets the pixmap to use when the object is insensitive. Do not set this if you want it generated for you.

-mnemonic char (CS)
Sets the button widget's mnemonic.

To make menu functions even more convenient, menus can have mnemonics associated with them. A mnemonic is a letter in a menu button label that can be pressed to activate the button. The first character in the label string that exactly matches the mnemonic is underlined when the button is displayed.

Note that when you specify a mnemonic for a pulldown, both the character and graphical servers automatically add ``<Alt>mnemonic'' as an accelerator for the menu.


-valueString string (CSG)
Specifies a string to act as the ``value'' of this widget. This value is returned in callbacks and may be specified in CheckBoxes and RadioBoxes to set the ``selected'' buttons. See VtCheckBox(VTCL) and VtRadioBox(VTCL) for more information.

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 02 June 2005