Classification
OTL Syntax
HMI.ChoiceDialog(StringTerm, StringTerm, ListTerm, IntegerTerm, IntegerVariable);
Description
The ChoiceDialog shall present a list of options to the user. It shall be possible for the user to select one of the options and to dismiss the dialog (e.g. by double-clicking an option or by clicking an "OK" button, etc.). Once the dialog is dismissed, the chosen option's index shall be assigned to a result variable. It shall not be possible to dismiss the dialog unless a choice has been made.
Properties
Name |
Data Type |
Class |
Default |
Cardinality |
Description
|
Options |
List |
Term |
- |
[1] |
This element specifies a list of strings which contains the possible options that shall be displayed.
|
Default |
Integer |
Term |
- |
[0..1] |
This optional element represents the index of the option which shall be preselected in the dialog.
|
Result |
Integer |
Variable |
- |
[1] |
This element indicates the integer variable where the chosen option's index shall be assigned to:
- 0 :The 1st option was selected.
- n-1: The nth option was selected.
|
OTL Examples
/// Local Declarations
List<String> Options1 = {"Option1", "Option2"};
Integer Integer1;
/// Flow
HMI.ChoiceDialog("Message", "Title", Options1, 1, Integer1);
See also
ConfirmDialog
InputDialog
ShowDocumentDialog