$messagebox

$messagebox

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

$messagebox

Presents a message box to the application user and waits for a response.

Syntax

$messagebox(message,type,style,defaultbutton[,heading])

Parameters

messageA character string, or an expression that evaluates to a character string.
typeA number that determines the type of message box. It also determines the icon that appears in the message box.
styleA number that determines the responses (push buttons) available to the application user.
defaultbuttonA number that determines which push button is the default button. Buttons are numbered 1, 2, and 3 from left to right.
headingA title for the message box. If you do not specify a heading, one is assigned based on type.

Message box types include:

TypeMeaningConstant Name

1

Error

cErrorMsg

2

Warning

cWarningMsg

3

Information

cInfoMsg

4

Question

cQuestionMsg

Push button styles include:

TypeButtons SuppliedConstant Name
1OKcOKStyle
2OK, CancelcOKCancelStyle

3

Retry, CancelcRetryCancelStyle

4

Yes, NocYesNoStyle

5

Yes, No, CancelcYesNoCancelStyle

6

Abort, Retry, IgnorecAbortRetryStyle

Return Value

Character string.

Comments

Use $messagebox to display a message in a dialog box of the specified type, with the specified heading or a default heading in the caption. The application user responds by activating one of the buttons provided by style, one of which is a defaultbutton. $Messagebox returns a character string containing the label of the button pressed by the application user.

Example

$messagebox("Delete file?",2,5,2,"File Operations")
Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

pt_BRPortuguese