Combobox Array

The Combobox Array can be used to select a row with values from a drop down menu. The index of the selected row is written into a variable.

Combobox Array 1:

Properties editor

The properties of a visualization element - except alignment and order - can all be configured in the properties editor. By default, this editor opens next to the visualization editor, or it can be opened explicitly via the "Properties" command (which can be found in the View menu as standard).

A property can be modified by editing the field "Value". To this end, an input field, a selection list, a dialog or checkbox that can be activated is provided in this field, depending on the element type. The value field opens

If a variable is assigned,

Working in the list of properties can be made easier with the aid of default, sorting and filter functions.

Element properties

All element properties and their descriptions are listed below.

Element name

The element name can be changed. Standard name is "GenElemInst_x". "x" stands for a sequential number.

Element type

The element type is entered here. For three element groups it is possible to switch between the corresponding elements by changing the element type:

Position

Here you can define the position (X/Y coordinates) and size (width and height) of the element in pixels. The origin is in the top left corner of the window. The positive x-axis is on the right, the positive y-axis runs downwards. If the values edited, the displayed element is simultaneously modified in the visualization editor.

X

Horizontal position in pixels – X=0 is the left edge of the window.

Y

Vertical position in pixels – Y=0 is the upper edge of the window.

Width

Width of the element in pixels

Height

Height of the element in pixels

Columns

The Element Combobox Array visualizes an array or structure variable in table view. The index of array elements or components of a structure is shown in a column or a row. Two-dimensional arrays or arrays of a structure displayed in several columns. The variable to be displayed is specified in the property ‘Data array’. If a variable is assigned there, the display of the table columns, in which the respective array elements are shown, can be specified. Each column that is assigned an index [<n>] can be configured individually.

Columns

  • [<n>]

The variable structure defined under "Data array" is used to determine the number of columns and assign the index <n>.

Example:

aStringTable : ARRAY [0..2, 0..4] OF STRING := [‚BMW‘, ‚Audi‘, ‚Mercedes‘, ‚VW‘, ‚Fiat‘, ‚150’, ‚150‘, ‚150‘, ‚150‘, ‚100‘, ‚blau‘, ‚grau‘, ‚silber‘, ‚blau‘, ‚rot‘

→ Three columns are formed [0], [1] and [2].

Max. array index

Numeric variable that is used to specify a maximum array index (optional)

Row height

Row height in pixels

Number of visible rows

This parameter can be used to specify how many rows are to be shown in the drop-down menu. If the number of rows is smaller is than the number of rows in the array, a scrollbar is displayed.

Size of the scrollbar

Width of the vertical scrollbar in pixels

Column [<n>]

Width

Column width in pixels

Image column

If this option is enabled, this column is used to display images from the global image pool or from user-defined image pools. The values in the table cells specify the ID of the image in the image pool.

Image configuration

  • Fill mode
  • Transparency
  • Transparency color

The following configurations can be implemented here:

  • Fill mode

Fill cell: The image is adjusted to the cell size, irrespective of the width/height ratio.

Centered: The image is centered while maintaining the proportions within the cell. The width/height ratio is maintained, even if the height or width is adjusted individually.

  • Transparency

If this option is enabled, the color set under transparency color is made transparent.

  • Transparency color

Here you can select a color from a selection list or via a color selection dialog, which can be opened via the Combobox Array 3: button. The color is shown transparent, if the corresponding transparency option is enabled.

Text alignment in column

Here you can modify the alignment for the column:

  • Left
  • Centered
  • Right

Texts

Tooltip

Here you can set the text to be used as tooltip for the element. It only appears in the visualization at runtime.

Text properties

Use of

The following two settings are available for selection:

  • Default style values
  • User-defined settings
    • Horizontal alignment
    • Vertical alignment
    • Font
    • Font color

User-defined text properties

Horizontal alignment

Defines the horizontal alignment of the text through selection of:

  • Left
  • Centered
  • Right

Vertical alignment

Defines the vertical alignment of the text through selection of:

  • Top
  • Centered
  • Bottom

Font:

Defines the font through selection from predefined fonts:

  • Standard
  • Heading
  • Large heading
  • Title
  • Note

Press Combobox Array 4: to opens the dialog for user-defined font properties.

Font color

Defines the font color for the element. Either from the selection list or via the dialog that opens when Combobox Array 5: is clicked.

Access rights

This setting relates to the access rights for the individual element. Click to open the Access rights dialog. The setting is only available if a user management was added to the PLC project. The following status messages are available:

Not set. All rights.

The default message is set, if the element is shown as available for all groups.

Rights are issued: Limited rights.

The message is set, if the element is shown with limited behavior for at least one group.

Additional settings

Variable

Variable of type integer, the value of which is the index of the selected row.

Data array

Variable of the type Array that is to be displayed. The structure of the variable determines the number of columns and rows in the table.

State variables

These are dynamic definitions of the availability of the element in online mode.

Invisibility

Specification of a boolean variable. If this returns TRUE, the element is invisible in online mode.

Input disabled

Specification of a boolean variable. If TRUE is returned, inputs for the element have no effect. Also, the element itself is greyed out in the visualization, to indicate that no user inputs are possible.

If the visualization uses the user management, the elements for user groups with access right "only visible" are grayed out.