SrcData
Data for the options menu.
The combo box drop-down list can be configured in two different ways:
Engineering
- Add a combo box to the interface.
- Change the drop-down list for the 'Src Data' attribute of the 'Data' category using the 'Combobox Src Data' dialog
- 1. Define the required number of entries and their sequence.
- 2. For each of the three entries, assign an ID, a text that is displayed in the drop-down list and the value behind this entry.
Additional Information
A simple list of options can be compiled in the Engineering. Each option consists of these components:
- ID: Custom ID
- Text: Display text
- Value: Value that can be passed on later within the application.
- Category (version 1.12.744): An optional category of the value, which is displayed in the drop-down of the control.
Further, complex data are supported by using Binding for this parameter.
- Arrays can be used directly. In this way, a string array or number array can also be linked.
- Objects are supported as a key-value list. The name of the property is interpreted as display text, the value is interpreted as a value.
![]() | The categories (and the display text independent of the value) can be used to easily group the values. |
Category A
Option 1 => valueA1
Option 2 => valueA2
Category B
Option 1 => valueB1
Option 2 => valueB2Items | List of all objects added |
|---|---|
| Delete the selected object |
| Change the object order (top = left) |
| Add a new object |
Category: General
|
Name |
Description |
|---|---|
ID | Definition of a freely selectable ID for the list entry. This ID must be unique within the defined entries. |
Text | Definition of the text of the list entry |
Value | Definition of the value of a list entry |
PLC
Array of a structure representing the structure of a list entry
![]() | The structure elements must be named identically to the attributes defined on the TwinCAT HMI side. Upper and lower case is taken into account. |
aComboboxEntries : ARRAY [1..5] OF ST_ComboboxEntry;
TYPE ST_ComboboxEntry:
STRUCT
id : INT;
text : STRING;
value : INT;
END_STRUCT
END_TYPEArray of a simple data type
aTexts : ARRAY [1..5] OF STRING;
aValues : ARRAY [1..5] OF INT;- Add a combo box to the interface.
- Link the array to the 'Src Data' attribute of the 'Data' category
Schema (version 1.8): tchmi:framework#/definitions/ListItemList
Schema (version 1.12): tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiCombobox.ListItemList
Attribute getter
public getSrcData(): TcHmi.Controls.Beckhoff.TcHmiCombobox.ListItem[] | any[] | Dictionary<any>;Parameter
Name | Type | Description |
|---|---|---|
- | - | - |
Return value
Type | Description |
|---|---|
TcHmi.Controls.Beckhoff.TcHmiCombobox.ListItem[] | any[] | Dictionary<any>, null | The current value of the attribute. |
Attribute setter
public setSrcData(valueNew: TcHmi.Controls.Beckhoff.TcHmiCombobox.ListItem[] | any[] | Dictionary<any> | null): void;Parameter
Name | Type | Description |
|---|---|---|
valueNew | TcHmi.Controls.Beckhoff.TcHmiCombobox.ListItem[] | any[] | Dictionary<any>, null | The new value of the attribute. If null is passed, the internal default value is used. |
Return value
Type | Description |
|---|---|
void | No return value. |
![]() | Available from 1.8 |



