Difference between revisions of "MESSAGEBOX()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Class==
 
Dialogs
 
 
 
 
==Purpose==
 
==Purpose==
 
Function to display a dialog box with user-defined elements
 
Function to display a dialog box with user-defined elements
Line 127: Line 123:
  
 
==Products==
 
==Products==
Recital Mirage Server, Recital Terminal Developer
+
Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Screen Dialogs]]
 +
[[Category:Screen Dialogs Functions]]

Latest revision as of 17:10, 3 December 2009

Purpose

Function to display a dialog box with user-defined elements


Syntax

MESSAGEBOX(<expC1> [, <expN> [, <expC2>]])


See Also

DIALOG BOX, DIALOG MESSAGE


Description

The MESSAGEBOX() function is used to display a dialog box with user-defined elements. The message, title, icon and buttons can all be defined.


Parameters Required Default Description
<expC1> Yes None The message to display in the message box.
<expN> No 0 A number representing the buttons and icon to include in the message box and the specification of the default button. See the tables below for details.
<expC2> No Recital The title of the message box.


Buttons

Value Buttons
0 Ok
1 Ok and Cancel
2 Abort, Retry and Ignore
3 Yes, No and Cancel
4 Yes and No
5 Retry and Cancel


Icons

(The Icon is ignored in products other than Recital Mirage)


Value Icon
16 Stop road sign
32 Question mark
48 Exclamation mark
64 Information sign


Default

Value Buttons
0 First button
256 Second button
512 Third button


The <expN> is the sum of the values to be specified, one from each table. For example, if <expN> is 292, the message box will have Yes and No buttons (4), a Question mark icon (32) and the second button (No) will be the default (256).

Return Values

The MESSAGEBOX() function returns a number signifying the selected button:


Return Value Buttons
1 Ok
2 Cancel
3 Abort
4 Retry
5 Ignore
6 Yes
7 No


For message boxes that include the Cancel button, pressing the Escape key will also cause the MESSAGEBOX() function to return 2.


Example

nReturn = messagebox("Are you sure?", 36, "Continue to next screen")
if nReturn = 6
    // user selected 'Yes', process accordingly
else
    // user selected 'No', process accordingly
endif


Products

Recital