Show: Delphi C++
Display Preferences

FMX.Graphics.TTextSettings

From RAD Studio API Documentation
Jump to: navigation, search

System.Classes.TPersistentSystem.TObjectTTextSettings

Delphi

TTextSettings = class(TPersistent)

C++

class PASCALIMPLEMENTATION TTextSettings : public System::Classes::TPersistent

Properties

Type Visibility Source Unit Parent
class public
FMX.Graphics.pas
FMX.Graphics.hpp
FMX.Graphics FMX.Graphics

Description

Defines properties and methods to store and manage appearance parameters of text objects.

TTextSettings declares the following text representation properties: TFont.Family, TFont.Size, TFont.Style, FontColor, HorzAlign, VertAlign, Trimming, WordWrap, and FontColorForState.

Classes using text objects (TMemo, TCustomEdit, TTextControl) and their descendants have the public property TextSettings of the TTextSettings type and they implement the ITextSettings interface. Through the methods declared in TTextSettings and ITextSettings you can manage text representation properties declared in TTextSettings. In Setting Text Parameters in FireMonkey and ITextSettings you can see how to do this in the component type independent style.

If you know a component type a priori, then you can set the fields of the TextSettings property without using the methods from ITextSettings. For example you can write:

Label1.TextSettings.FontColor := MyColor;

This code sets the published TLabel.FontColor property of the TLabel type object, which actually inherits the TTextSettings.FontColor property.

Note:
Remember that when you are changing the value of text representation properties of the TTextSettings type objects (for example of the TextSettings.FontColor property), then the actual changing of the object's view happens only if the ITextSettings.StyledSettings property does not contain the TStyledSetting.FontColor constant. The "Relation between TStyledSetting constants and TTextSettings properties" table shows the TStyledSetting constants that control handling of the TTextSettings text representation properties.

See Also

Personal tools
RAD Studio 10.2 Tokyo
In Other Languages
Previous Versions
Assistance