XenoGuard Documentation

Show Message Box

Actions » Programming » General » Show Message Box 

The action Show Message Box displays a pop-up message dialog with action buttons.



[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. In the General node, select the Show Message Box action.

Parameters:

The action has the following input parameters:


name Description
Text Specifies the string value to be displayed.

Allowed Context Scopes 
[Fixed, Local, Global]
Allowed Context Types 
[Variable, Parameter, Enum] 
Title
The title of the message box. If the title is missing, the name of the software is automatically used.

Allowed Context Scopes
[Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
Buttons The buttons of the message box.

Allowed Context Scope [Fixed]
Allowed Values 
[Ok, Ok - Cancel, Abort - Retry - Ignore, Yes - No - Cancel, Yes - No, Retry - Cancel]  
Icons The displayed icon on the message box.

Allowed Context Scopes
 [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
Allowed Values [Information, Question, Warning, Error]
Default Button Index The specified index value of the focused button.

Allowed Context Scopes 
[Fixed, Local, Global]
Allowed Context Types 
[Variable, Parameter, Enum] 
Auto Close Delay The time in milliseconds before the message box automatically closes.

Allowed Context Scopes
 [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]

Results:

The action returns the following results:

name
description
Result Contains the selected dialog response from the message box.

Possible values: [Ok, Cancel, Abort, Retry, Ignore, Yes, No, Cancel].

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter]

Information The Message Box can be used to confirm information, ask a question, or show a warning or error message to the user.

Example 1 (Show a message about the dictionary's content count):

This example displays a dialogue box about the local dictionary named Employees. The Count is then passed to the Text parameter with a placeholder and then creates an output via message box.

Example 2 (Warns the user on deleting the contents of a CSV file):

This example displays a warning message box for a CSV file named Items.csv before deleting all its contents. The message box button is focused on the "Cancel" button and automatically closes after 5000 milliseconds. The user's response is then stored in Result of the result list and decides an action to be taken using the If control statement.

See other general actions:

Region of Actions
Write Text
Write System Message
Comment
Comment Line
Show Workspace Information
Show Execution Information