OTX Reference  
OpenTestSystem.Otx.Extensions.HMI.Actions.ChoiceDialog Class Reference

Dialog to select from list More...

Inheritance diagram for OpenTestSystem.Otx.Extensions.HMI.Actions.ChoiceDialog:
Inheritance graph

Public Attributes

IntegerTerm _default
 Cardinality [0..1]
This optional element represents the index of the option which be preselected in the dialog. More...
 
ListTerm options
 Cardinality [1]
List of strings, which are presented as choices (eg: ListCreate ("string", "option1" "option2", "Option 3")). More...
 
IntegerVariable result
 Cardinality [1]
After closing, the dialog contains the specified variable here the value of selection (-1 = no choice, 0 = first option, 1 = second option, etc.). More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Extensions.HMI.Actions.Dialog
StringTerm message
 Cardinality [0..1]
If the runtime system contains the capability to show a message as part of the display, the String will be shown. More...
 
StringTerm title
 Cardinality [0..1]
If the runtime system contains the capability to show a dialog box with a Title bar, the String will be shown. It is assumed that this String will be shown with more prominence than the message parameter. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Actions.ActionRealisation
OtxLink validFor
 Cardinality [0..1]
Validity of ActionRealisation. More...
 

Detailed Description

Dialog to select from list

The ChoiceDialog Activity opens a modal Dialog with a list of choices and prompts the user for selection.

Exceptions
Core.Exceptions.OutOfBoundsException
Checker rules
CheckerRule.HMI_Chk001 - correct list type for ChoiceDialog options


Syntax
HMI.ChoiceDialog(StringTerm message, StringTerm title, ListTerm options, IntegerTerm default = 0, IntegerVariable result);
ListTerm options
Cardinality [1] List of strings, which are presented as choices (eg: ListCreate ("string",...
Definition: HMI.cs:1605
IntegerVariable result
Cardinality [1] After closing, the dialog contains the specified variable here the value of selection...
Definition: HMI.cs:1625
StringTerm title
Cardinality [0..1] If the runtime system contains the capability to show a dialog box with a Title ba...
Definition: HMI.cs:845
StringTerm message
Cardinality [0..1] If the runtime system contains the capability to show a message as part of the dis...
Definition: HMI.cs:855
Examples
// Local Declarations
List<String> Options1 = {"Option1", "Option2"};
Integer Integer1;
// Flow
HMI.ChoiceDialog("Message", "Title", Options1, 1, Integer1);

Member Data Documentation

◆ _default

IntegerTerm OpenTestSystem.Otx.Extensions.HMI.Actions.ChoiceDialog._default

Cardinality [0..1]
This optional element represents the index of the option which be preselected in the dialog.

◆ options

ListTerm OpenTestSystem.Otx.Extensions.HMI.Actions.ChoiceDialog.options

Cardinality [1]
List of strings, which are presented as choices (eg: ListCreate ("string", "option1" "option2", "Option 3")).

◆ result

IntegerVariable OpenTestSystem.Otx.Extensions.HMI.Actions.ChoiceDialog.result

Cardinality [1]
After closing, the dialog contains the specified variable here the value of selection (-1 = no choice, 0 = first option, 1 = second option, etc.).