dOPC Client Toolkit
Close
dOPCGUI.TdGUIItem.OnChangeData

OnChangeData provides the ability to overwrite the default instructions given to a visual control when the value of the associated TdOPCItem changes.

property OnChangeData: TGUIOnSetValue;
__property TGUIOnSetValue OnChangeData;
procedure TForm1.dOPCGUI1Items0nChangeData(Control: TControl; var OPCValue: OleVariant; var Handled: Boolean); begin if Control is TMemo then begin TMemo(Control).Lines.Add(OPCValue); Handled := true; //no default work procedure for this item end; end;

or

procedure TForm1.dOPCGUI1Items0nChangeData(Control: TControl; var OPCValue: OleVariant; var Handled: Boolean); begin if OPCValue <> 0 then OPCValue := 1; Handled := false; //use default work procedure, but with new Value end;
Kassl GmbH Copyright © 2019. All rights reserved.