-

Drop List

A drop list is a combination of a text object and a list box. The drop list allows the user to select a single option from a list of available options. Each option is defined by its index, assigned value and the text displayed in the drop list. The list of options displayed in the drop list is defined in the text list that is bound to the drop list. When an option is selected, the index of the selected option in the drop list is returned and the value assigned to the selected text list entry can be written to a connected variable (HMI tag).

The 'Drop List' category of the 'Properties' tab of the drop list object provides the properties described in the following table:

Example of Drop List properties

Drop List propertyDescription
Text listText list to which the drop list is bound. In the text list, the data for the drop list options (text, value etc.) are defined.
Selected indexThe selected numeric variable provides the zero-based index of the selected option at runtime. If no variable is selected, the value is -1. The first option in a drop list (text list) starts at index 0.
Selected identifier variableVariable to which the value of the currently selected option is written. The value to be written is the 'Write Value' entered for the selected option in the bounded text list.
PaddingDefines the space between the drop list element and its options (default value: 24).

Drop List object at runtime

Configuring a drop list

To configure a drop list object, proceed as follows:

  1. If not yet done, create a text list with the options to be displayed in the drop list as described in the topic "Working with Text Lists".

    Note
    In the text list to be connected to the drop list object, the start value and the end value of a text list entry must be equal.

    Text list example

  2. Create a new HMI page or open an existing page.
  3. In the COMPONENTS area under the 'HMI' category, open the 'Objects' group and drag the 'Drop List' object into the HMI page.
  4. In the 'Drop List' category of the 'Properties' tab of the drop list object, assign the desired text list with the drop list options to be displayed to the 'Text List' property. Optional, assign a variable (HMI tag) to the 'Selected Index variable' and 'Selected Identifier variable' properties.