The Dialog Function

Cypress Enable supports the dialog function. This function is a user-defined function that can be called while a custom dialog box is displayed. The dialog function makes nested dialog boxes possible and receives messages from the dialog box while it is still active.

When the function dialog() is called in Enable it displays the dialog box, and calls the dialog function for that dialog. Enable calls the dialog function to see if there are any commands to execute. Typical commands that might be used are disabling or hiding a control. By default, all dialog box controls are enabled. If you want a control to be hidden you must explicitly make it disabled during initialization. After initialization Enable displays the dialog box. When an action is taken by the user Enable calls the dialog function and passes values to the function that indicate the kind of action to take and the control that was acted upon.

The dialog box and its function are connected in the dialog definition. A "function name" argument is added to the Begin Dialog instruction, and matches the name of the dialog function located in your Enable program.

Begin Dialog UserDialog1 60,60, 260, 188, "3", .Enable

Your dialog box name should not match any reserved word or constant. For information on constants, see "Enumerated Constants Overview". To view a list of other reserved words, see "Functions, Statements, Reserved words - Quick Reference".

More:

The Dialog Function Syntax