Displays a standard modal windows message box.
Usage:
dlgMessageBox (object me, string message, string caption, integer buttonType, integer iconType, integer defaultButton )
Parameters:
message (string) - Message to be displayed
caption (string) - String that contains the dialog box title
buttonType (integer) - Specifies the behavior of the dialog box buttons. They can be any of the following values.
- The message box contains one push button: OK
- The message box contains two push buttons: OK and Cancel .
- The message box contains two push buttons: Retry and Cancel
- The message box contains two push buttons: Yes and No
- The message box contains three push buttons: Yes , No , and Cancel
- The message box contains three push buttons: Abort , Retry , and Ignore
iconType (integer) - Specifies the contents of the dialog box. They can be any of the following values.
- An exclamation-point icon appears in the message box
- An information icon consisting of a lowercase letter i in a circle appears in the message box.
- An asterisk icon consisting of a lowercase letter i in a circle appears in the message box
- A question-mark icon appears in the message box
- A stop-sign icon appears in the message box
- A error-sign icon appears in the message box
- A hand stop-sign icon appears in the message box
- An exclamation-point icon appears in the message box
defaultButton ( integer ) - specifies the default button. This value should be in the range of the buttons available. For example, specify 1 to set the first button as default; specify 2 to set the 2nd button as default..etc.
Returns:
(integer): the button type clicked. The possible values are:
- OK is clicked
- YES is clicked
- RETRY is clicked
- TRY AGAIN is clicked
- INGORE is clicked
- NO is clicked
- CANCEL is clicked
- ABORT is clicked
- CONTINUE is clicked
Example:
xtRose = xtra("Rosetta").new( )
nClicked = xtRose.dlgMessageBox("File reading error. Do you wish to try again?", "Read error", 6, 4, 2 )
case nClicked of
(8): -- abort clicked, quit function call
(3): -- retry clicked, call function again
(5): -- ignore clicked, do next function
end case
Notes: