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

Dialog class options

Dialog class options apply to widgets created with the following SCO Visual Tcl commands:

VtErrorDialog VtFileSelectionDialog
VtFormDialog VtInformationDialog
VtMessageDialog VtQuestionDialog
VtSelectionDialog VtWarningDialog
VtWorkingDialog  

Dialogs support up to five buttons directly: Ok, Apply, Reset, Cancel, and Help.

If neither -cancel, -help, or -ok are specified, the dialog defaults to showing all three of these buttons. If any of these three options are specified, only the specified buttons appear.

You must always specify -apply and -reset if you want the Apply and Reset buttons to appear.

The following dialog class options are available:


-apply (CSG)
Specifies that an Apply button should appear on the form. Also signifies that only the buttons specified with either a button, callback or label reference will be used on the dialog (as opposed to the default buttons for the dialog). If no buttons are specified, the default buttons for that dialog will appear. (This is not applicable to Message dialogs since there is no Apply button.)

-applyCallback cmd (CS)
Specifies command cmd to call when the user presses the Apply button.

-applyLabel string (CS)
Specifies the label for the Apply button.

-autoDestroy boolean (CS)
Specifies that the dialog is automatically destroyed (if boolean is TRUE) after the user clicks on either OK or Cancel on the dialog box. The default is TRUE. If FALSE, the dialog must be destroyed with VtDestroy(VTCL). Note that this option is only valid in Selection, File selection, and Message dialogs.

-autoHide boolean (CS)
Specifies that the dialog is automatically hidden (if boolean is TRUE) after the user clicks on either OK or Cancel on the dialog box. The default is TRUE. If FALSE, the dialog must be destroyed with VtHide(VTCL). Note that this option is only valid in Selection, File selection, and Message dialogs.

-cancel (CSG)
Sets a Cancel button on the form. Also signifies that only the buttons specified with either a button, callback or label reference will be used on the dialog (as opposed to the default buttons for the dialog). If no buttons are specified, the default buttons for that dialog will appear.

-cancelButton string (CS)
Sets the button activated whenever <Esc> is pressed within the dialog. Defaults to the Cancel button if not set.

-cancelCallback cmd (CS)
Callback cmd to call when the user clicks on the Cancel button in a dialog.

-cancelLabel string (CS)
Sets the Cancel button label string.

-defaultButton OK | APPLY | RESET | CANCEL | HELP | widgetName (CS)
Sets the default button for a dialog. (The default button is the one which is selected by default.) For dialog boxes that have pre-defined buttons you specify the tokens ``OK'' or ``APPLY'', and so on. If you create a form dialog yourself, you specify the default button by passing in the widgetName. This option does not apply to FileSelection dialogs.

-dlogHeight integer (G)
Returns the height of the entire dialog in pixels (OSF/Motif mode) or characters (caharacter mode).

-dlogWidth integer (G)
Returns the width of the entire dialog in pixels (OSF/Motif mode) or characters (caharacter mode).

-help (CSG)
Specifies that a Help button should appear on the form. Also signifies that only the buttons specified with either a button, callback or label reference will be used on the dialog (as opposed to the default buttons for the dialog). If no buttons are specified, the default buttons for that dialog will appear.

-helpCallback string (CS)
Specifies the callback to call when the user clicks on the Help button. If helpCallBack is not specified, pressing Help accesses the help system.

-helpLabel string (CS)
Labels the Help button with string.

-modeless (CS)
Sets the dialog to be modeless. This means that input can go to any window (as opposed to modal behavior, which means that only the topmost dialog can accept input).

-ok (CSG)
Specifies that an OK button should appear on the form. Also signifies that only the buttons specified with either a button, callback or label reference will be used on the dialog (as opposed to the default buttons for the dialog). If no buttons are specified, the default buttons for that dialog will appear.

-okCallback cmd (CS)
Sets cmd to be the command to call when the OK button in a dialog is pressed.

Selection and FileSelection dialogs will pass the user's selection as part of the callback data (which is a keyed list). The key to reference is selection.

An additional callback key, selection, specifies the selection in the selection dialog.


-okLabel string (CS)
Labels the OK button with string.

-reset (CSG)
Specifies that a Reset button should appear on the form.

-resetCallback cmd (CS)
Sets the callback command cmd for the Reset button.

-resetLabel string (CS)
Sets the label string for the Reset button.

-tabList widgetName list (CS)
Sets the order that widgets within the dialog will be visited by the <Tab> key.


NOTE: This option only works under character mode. We recommend its use in making screen interfaces more intuitively navigable.


-title String (CSG)
Specifies the title to appear in the title bar of the window surrounding the dialog.

-wmCloseCallback string (CS)
Specifies a command or procedure to execute when the dialog window is forced to closed by the GUI window manager. A wmCloseCallback may be set only once on a widget.

-wmDecoration ALL | RESIZE | TITLE | BORDER | MENU | MINIMIZE | MAXIMIZE (C)
Sets the window manager window decoration. This only applies in the graphical environment under a Motif-based window manager. You can combine more than one option; MINIMIZE and MAXIMIZE only apply on the first dialog created. For example:
VtFormDialog $ap.form \
-wmDecoration {TITLE RESIZE MENU}

-wmShadowThickness integer (CS)
(Character mode only). Indicates how much of a shadow to put around dialogs. 0 is no shadow, 1 is the default of a single space on the top and left and a single shadow character on the bottom and right. Numbers greater than 1 work, but are not optimally designed for visual appearance. Normally, you would set -wmShadowThickness 0 on your main form dialog and any subsequent dialogs requiring the full width or height of the screen.


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