VtFormDialog(VTCL)

VtFormDialog(VTCL)


VtFormDialog -- create form dialog using form class options

Syntax

VtFormDialog object_name [options]

Description

Creates a FormDialog, using all the standard Form class options. You can specify the buttons across the bottom of the dialog by using the -ok, -okLabel, -okCallback, -cancel, and -help options. The command returns the name of the form dialog. Buttons are created left to right in the following order:
OK APPLY RESET CANCEL HELP
Note that when creating a form, it is advisable to make the form the child of another form. This enables the new form to inherit attributes such as fonts from the dialog it was launched from. (If the form's parent is a button, it cannot inherit such attributes.)

Note also that you should use VtGetValues to get the widgetName of any of the buttons on the bottom of the form and the option used to get the button. For example, to get the widgetName of the OK button, say:

set okButton [VtGetValues -ok]
For the cancel button, say:
set cancelButton [VtGetValues -cancel]

Options

-cancelButton OK | APPLY | RESET | CANCEL | HELP | object_name (CS)
Sets the widget that is the cancel button for a dialog (that is, the button that is activated in response to an <Esc> keypress).

For dialog boxes that have pre-defined buttons you can specify one of the tokens OK, APPLY, CANCEL, HELP to select the default buttons created by the form dialog.

If you create the form dialog buttons yourself you can specify the widgetName of the button you have created that you want to be treated as the cancel button.

-wmCloseCallback cmd (C)
Registers a callback for the window manager ``Close'' menu item.

See also