Selection list
In the library JCmpVisuBasic, the following input objects are available for the creation of selection lists:
SelectElementDirect: Selection option as dropdown list.
SelectionElement: Selection option in separate window.
For all SelectionElements, the same variable type stSelectionBoxType is used.
VAR
// Example for selection elementstSelection : JCmpVisuBasic.stSelectionBoxType;
END_VAR
If you now drag the desired object from the Visualization Toolbox into the process screen, a parameter window opens. Here you can assign the variable to the parameter for the input window.

It is also possible to enter or change the parameters afterwards via the object property.

The structure variable JCmpVisuBasic.stSelectionBoxType contains the following variables:

Only the following variables are required from the structure variable:
stSelectionBoxType:
wsTitleText: Header for the selection window (only for SelectionElement).
wsList: Transfer of the texts, which should be displayed in the selection list/window.
uiIndex: Indicates which text line has been selected.
In the first example, SelectElementDirect is used. A selection list opens when clicking on the input field.

In the second example, SelectElement is used. A selection window opens when clicking on the input field.

The code for both examples could look like this:
