RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TControl.AssignTo Method

Overrides the inherited AssignTo function to enable assignments to TAction objects.

Pascal
procedure AssignTo(Dest: TPersistent); override;
C++
virtual __fastcall AssignTo(TPersistent * Dest);

Do not call the protected AssignTo method in application code. The Assign method of a persistent object calls AssignTo if it is passed the control as a Source and the persistent object does not know how to copy the properties of the control. The Dest parameter is the persistent object that should have its properties copied from the control. 

As implemented in TControl, AssignTo checks whether the Dest parameter is a TCustomAction object, and if so, assigns values to its Enabled, Hint, Caption, and Visible properties and its OnExecute event. This allows arbitrary controls to assign these to an associated action object. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!