|
This function will display a message to the
user, and will return a value specifying which button they
tapped.
MESSAGEBOX(Prompt,Buttons,Title)
Parameters
Prompt
The text to display to the user.
Buttons
The following list of values is split into 3 sections. Select
one option from each section, and add up the values. For example, to
display the YES, NO, CANCEL buttons (3) with a QUESTION Icon (32) and have
the NO button as the default (256), use 3+32+256 =
291.
SECTION #1 (Number
and Type of buttons)
0 = OK
Button
1 = OK and
Cancel
2 = Abort, Retry,
Ignore
3 = Yes, No,
Cancel
4 = Yes,
No 5
= Retry, Cancel SECTION #2
(Icon
Style)
16 =
Critical
32 =
Question
48 =
Exclamation
64 = Information SECTION #3
(Default
Button)
0 = 1st Button is the default
button
256 = 2nd Button is the default
button
512 = 3rd Button is
default
768 = 4th Button is default
Title
The caption of the messagebox.
VALUE RETURNED:
1 = OK 2 = Cancel 3 = Abort 4 =
Retry 5 = Ignore 6 = Yes 7 = No
EXAMPLE: In the following code, the user
will be presented with a message box that prompts them .. "Do You Want to
continue?". They will be given 3 options YES, NO, CANCEL, and the NO
button will be the default.
If they tap NO, the memory variable
'buttonPressed' will contain the value 7.
SETMEM(buttonPressed//MESSAGEBOX("Do You
Want to continue?",291,"abcDB"))
|