Vcl.ComCtrls.TTextAttributes.Assign

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Assign(Source: TPersistent); override;

C++

virtual void __fastcall Assign(System::Classes::TPersistent* Source);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TTextAttributes

Description

Sets the properties of a TTextAttributes object to match the properties specified in another TTextAttributes object or in a TFont object.

Use Assign to change all the text attributes at once. Assign can set the font characteristics of the selected text to match the default font characteristics or vice versa. When the Source is a TTextAttributes object, Assign matches only the Color, Name, Style, and Pitch properties. When the Source is a TFont object, Assign matches the Size as well.

Note: Assign only succeeds at runtime when the Source is a TTextAttributes object, a TFont object, or an object that has implemented an AssignTo method that deals with the TTextAttributes object. Other source objects will raise an System.SysUtils.EConvertError exception.

See Also

Code Examples