Vcl.Controls.TControl.AssignTo

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure AssignTo(Dest: TPersistent); override;

C++

virtual void __fastcall AssignTo(System::Classes::TPersistent* Dest);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TControl

Description

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

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.

See Also