DIALOG MESSAGE

From Recital Documentation Wiki
Revision as of 11:57, 28 April 2009 by Yvonnemilne (Talk | contribs)

Jump to: navigation, search

Class

Screen Dialogs


Purpose

Display a text message in a dialog box


Syntax

DIALOG MESSAGE <expC> [DEFAULT <expN>]


See Also

@...SAY, DIALOG FIELDS, DIALOG GET, DIALOG QUERY, DIALOG SCOPE, Function Keys, LASTKEY(), MESSAGE, MESSAGEBOX(), SET COLOR, SET COLOR OF, SET DIALOG, SET MESSAGE


Description

This DIALOG MESSAGE command is used to display the specified text message <expC> in a dialog box centered on the screen. The screen is automatically saved and restored when using the DIALOG MESSAGE command. The SET COLOR and SET COLOR OF DIALOGFRAME commands may be used to specify the colors for the dialog box and frame.

The maximum width of <expC> is 79 characters.

"Yes" and "No" buttons will also be displayed for the user to respond the displayed message. The LASTKEY() function will return 89, which is the ASCII character "Y" if the "Y" or "y" keys were pressed or if the [RETURN] key was pressed on the "Yes" button.

If SET DIALOG is OFF, the message will be displayed in the message line.

DEFAULT <expN>

The DEFAULT clause can be used to set the default button. The default button will be activated when the user hits the [RETURN] key. If DEFAULT 1 is included, or if no DEFAULT clause is included, the 'No' button will be the default. If DEFAULT 2 is included, the 'Yes' button will be the default.


Example

dialog message "Do you want to continue?" default 2
if lastkey() = 89
    //... continue
else
    return
endif


Products

Recital Mirage Server, Recital Terminal Developer