Dialog Object
Description
The Dialog object provides access to simple user-interface features provided by CRT.
Syntax
Remarks
CRT's Dialog object is accessed through the top-level objectÆs æDialogÆ property.
Dialog Object Methods
| |
|
ááááPrompt |
|
ááááMessageBox |
Description
Prompt a user to enter a string.
Syntax
Remarks
The Prompt function displays a simple dialog that has message and an edit field for the user to enter a string. The message parameter is simply an informational string displayed in the prompt dialog. Optionally the title of the prompt dialog may be set by passing a title string. By default the edit field is empty, but the initial contents of the edit field may be set with the optional default string. Finally, if the text entered in the edit field is to be obscured as it is entered (such as when entering a password) then the boolean æisPasswordÆ field should be set to True.
If the user clicks OK, Prompt returns the entered string.
Example:
Description
Display a message
Syntax
Remarks
The MessageBox function displays a message string to the user. The optional title string sets the title or caption of the MessageBox. The buttons that appear on the MessageBox can be configured by passing a combination of numeric values in the optional æbuttonsÆ parameter. By default MessageBox will display the message string with an "OK" button. However, many possibilities exist for displaying messageboxes with different icons, and buttons.
The MessageBox function returns a numeric value that can be used to identify which button was clicked.
The following code sample defines the constants that can be combined to form the æbuttonÆ parameter as well as the possible numeric return values: