FMX.TextLayout.TTextLayout.AddAttribute

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure AddAttribute(const ARange: TTextRange; const AAttribute : TTextAttribute); overload;
procedure AddAttribute(const AAttributeRange: TTextAttributedRange); overload;

C++

void __fastcall AddAttribute(const TTextRange &ARange, const TTextAttribute &AAttribute)/* overload */;
void __fastcall AddAttribute(TTextAttributedRange* const AAttributeRange)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
FMX.TextLayout.pas
FMX.TextLayout.hpp
FMX.TextLayout TTextLayout

Description

Adds the specified text properties to the Attributes list of the current TTextLayout.

The text properties can be added in two ways:

  • As a pair of TTextRange and TTextAttribute objects, using the first overloaded method. The range and the attributes (font and color) are specified separately.
  • As a TTextAttributedRange object, using the second overloaded method.

The text properties of the current TTextLayout can be accessed through the Attributes property.

To remove text properties from Attributes list, use the DeleteAttribute or DeleteAttributeRange method.

Platform Support

Color attributes are not supported on Windows.

See Also