| Purpose | The <msg> statement is used to display a message box on the screen to the user. As such it should not be used on a server-side implementation of a Superx++ program because there will be no human present to click the buttons on the message box. | |||||||||
| Format |
<msg buttons="{buttons}" icon="{icon}" modal="{modal}" defaultButton="{defaultButton}" caption="{caption}"> {message} </msg> The <msg> statement returns a result-- see {result} below. {buttons} |
(optional) buttons to be displayed on the message box-- default is ok |
abortretryignore = Abort, Retry and Ignore buttons |
ok = OK button |
okcancel = OK and Cancel buttons |
retrycancel = Retry and Cancel buttons |
yesno = Yes and No buttons |
yesnocancel = Yes, No and Cancel buttons |
| |
| {icon} | ||||||||||
| (optional) icon to be displayed on the message box-- default is information | ||||||||||
| exclamation = Exclamation icon | ||||||||||
| information = Information icon | ||||||||||
| question = Question icon | ||||||||||
| stop = Stop icon | ||||||||||
| {modal} | ||||||||||
| (optional) modality of the message box-- default is app | ||||||||||
| app = Application modality-- user cannot click on anything else in the application but can switch to another application | ||||||||||
| system = System modality-- user cannot click on anything else in the entire system | ||||||||||
| {defaultButton} | ||||||||||
| (optional) default button in the message box-- default is 1 | ||||||||||
| 1 = First button is the default one-- when user clicks the Enter key then the button is clicked automatically | ||||||||||
| 2 = Second button is the default one-- when user clicks the Enter key then the button is clicked automatically | ||||||||||
| 3 = Third button is the default one-- when user clicks the Enter key then the button is clicked automatically | ||||||||||
| {caption} | (optional) caption to be displayed in the title bar the message box-- default is Superx++ | |||||||||
| {message} | message to be displayed on the message box | |||||||||
| {result} | ||||||||||
| the button which was clicked on the message box by the user | ||||||||||
| ok = OK button was clicked | ||||||||||
| abort = Abort button was clicked | ||||||||||
| cancel = Cancel button was clicked | ||||||||||
| retry = Retry button was clicked | ||||||||||
| ignore = Ignore button was clicked | ||||||||||
| yes = Yes button was clicked | ||||||||||
| no = No button was clicked | ||||||||||
| Example #1 |
<msg>Simple message!</msg> Displays a message box with all the defaults and the text Simple message! |
|||||||||
| Example #2 |
<xout> <msg caption="MyApp" buttons="yesno" defaultButton="1" icon="question">Do you wish to continue?</msg> </xout> Displays a message box that asks the user if they want to continue and gives them a Yes and a No button. The result is written to the output stream. |
|||||||||