create

[ Function ]

public static create(
   expression: string,
   fn: (value: any) => void,
   fnThis: TcHmi.Controls.System.baseTcHmiControl
): void;

Creates a binding between a symbol and a control attribute.

Parameter

Name

Type

Description

expression

string

Symbol expression

fn

(value: any) => void

Reference to the control setter function

fnThis

TcHmi.Controls.System.baseTcHmiControl

Reference to the control instance

Return value

Type

Description

void

No return value

create 1:

Available from 1.8

Sample - JavaScript

var myControl = TcHmi.Controls.get('TcHmiTextbox_1');
if(myControl){
    TcHmi.Binding.create('%i%MyInternalSymbol_1%/i%',myControl.setText, myControl);
}

Sample - TypeScript

let myControl = TcHmi.Controls.get<TcHmi.Controls.Beckhoff.TcHmiTextbox>('TcHmiTextbox_1');
if(myControl){
    TcHmi.Binding.create('%i%MyInternalSymbol_1%/i%',myControl.setText, myControl);
}