SCO Visual Tcl Reference Guide
Chapter 3, SCO Visual Tcl - graphical scripting language

Dialog class options

Dialog class options

The following options are specific to dialogs.

-apply (C)
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 (C)
Command cmd to call when Apply button is pressed.

-applyLabel string (CS)
Label for the Apply button.

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

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

-cancel (C)
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.

-cancelCallback cmd (C)
Callback cmd to call when you hit 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.

-help (C)
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.

-helpLabel string (C)
Sets the label for the Help button.

-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 (C)
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 (C)
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.

Additional callback keys:

selection
selection in the selection dialog

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

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

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

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

-tabList widgetName list (S)
Sets the order that widgets within the dialog will be visited by the <Tab> key. This option only works under character mode; however, its use is recommended because it can be used to make character mode screen interfaces more intuitively navigable.

-wmDecoration ALL | RESIZE | TITLE | BORDER | MENU | MINIMIZE | MAXIMIZE (C)
Sets the window manager window decoration. This only applies in the graphical environment under a OSF/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)
Works only in character mode. 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 above 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.

For a detailed description of all Visual TCL commands, see Chapter 4, ``Graphical commands'' and Chapter 5, ``Non-graphical commands''.