Previous - System Standard Dialogs Section Home - System Standard Dialogs Next - dlgColorBox


dlgMessageBox ( )

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.

  1. The message box contains one push button: OK
  2. The message box contains two push buttons: OK and Cancel .
  3. The message box contains two push buttons: Retry and Cancel
  4. The message box contains two push buttons: Yes and No
  5. The message box contains three push buttons: Yes , No , and Cancel
  6. 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.

  1. An exclamation-point icon appears in the message box
  2. An information icon consisting of a lowercase letter i in a circle appears in the message box.
  3. An asterisk icon consisting of a lowercase letter i in a circle appears in the message box
  4. A question-mark icon appears in the message box
  5. A stop-sign icon appears in the message box
  6. A error-sign icon appears in the message box
  7. A hand stop-sign icon appears in the message box
  8. 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:

  1. OK is clicked
  2. YES is clicked
  3. RETRY is clicked
  4. TRY AGAIN is clicked
  5. INGORE is clicked
  6. NO is clicked
  7. CANCEL is clicked
  8. ABORT is clicked
  9. 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:


Previous - System Standard Dialogs Section Home - System Standard Dialogs Next - dlgColorBox