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 | Symbol expression | |
fn | (value: any) => void | Reference to the control setter function |
fnThis | Reference to the control instance |
Return value
Type | Description |
---|---|
void | No return value |
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);
}