$messagebox
Welcome to our Knowledge Base
Documentation | Blog | Demos | Support
< All Topics
Print
$messagebox
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
Presents a message box to the application user and waits for a response.
Syntax
$messagebox(message,type,style,defaultbutton[,heading])
Parameters
message | A character string, or an expression that evaluates to a character string. |
type | A number that determines the type of message box. It also determines the icon that appears in the message box. |
style | A number that determines the responses (push buttons) available to the application user. |
defaultbutton | A number that determines which push button is the default button. Buttons are numbered 1, 2, and 3 from left to right. |
heading | A title for the message box. If you do not specify a heading, one is assigned based on type. |
Message box types include:
Type | Meaning | Constant Name |
1 | Error | cErrorMsg |
2 | Warning | cWarningMsg |
3 | Information | cInfoMsg |
4 | Question | cQuestionMsg |
Push button styles include:
Type | Buttons Supplied | Constant Name |
1 | OK | cOKStyle |
2 | OK, Cancel | cOKCancelStyle |
3 | Retry, Cancel | cRetryCancelStyle |
4 | Yes, No | cYesNoStyle |
5 | Yes, No, Cancel | cYesNoCancelStyle |
6 | Abort, Retry, Ignore | cAbortRetryStyle |
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")
Updated
ByJason Lee
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