getMap
[ Function ]
export function getMap(): Map<string, TcHmi.Controls.System.baseTcHmiControl>;
Returns a ES5 Map with all controls. The key is the respective identifier of the controls.
Parameter
Name | Type | Description |
---|---|---|
|
|
|
Return value
Type | Description |
---|---|
An object that contains all controls. |
Available from version 1.12 |
Sample
let allControls = TcHmi.Controls.getMap();
let someControl = allControls.get('TcHmiButton');
if (someControl && someControl instanceof TcHmi.Controls.Beckhoff.TcHmiButton) {
someControl.setText('Wow, we have ' + allControls.size + ' controls!');
}