From Appmethod Libraries
Jump to: navigation, search

Object Pascal

TBaseTextSettings = class (TTextSettings)


class PASCALIMPLEMENTATION TBaseTextSettings : public Fmx::Graphics::TTextSettings


Type Visibility Source Unit Parent
class public
FMX.Controls TTextSettingsInfo


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

FMX.Controls.TTextSettingsInfo.TBaseTextSettings inherits from FMX.Graphics.TTextSettings. All content below this line refers to FMX.Graphics.TTextSettings.

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.

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