dOPC Client Toolkit Help file
TdGUIItem.OnChangeData Event
C++
__published: __property TGUIOnSetValue OnChangeData;
C#
event TGUIOnSetValue OnChangeData;
Visual Basic
Event OnChangeData As TGUIOnSetValue

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

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;
What do you think about this topic? Send feedback!
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.