FMX.TextLayout.TTextLayout.AddAttribute

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

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.

See Also