FMX.Graphics.ITextSettings.StyledSettings

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property StyledSettings: TStyledSettings read GetStyledSettings write SetStyledSettings;

C++

__property Fmx::Types::TStyledSettings StyledSettings = {read=GetStyledSettings, write=SetStyledSettings};

Properties

Type Visibility Source Unit Parent
property public
FMX.Graphics.pas
FMX.Graphics.hpp
FMX.Graphics ITextSettings

Description

Specifies which styled text representation properties are defined by a style (see DefaultTextSettings) and which can be set manually (see TextSettings).

Styled text representation properties specified in StyledSettings are taken from a style and cannot be changed manually. The full set of styled settings are defined in the AllStyledSettings constant. It contains the following properties:

[TStyledSetting.Family, TStyledSetting.Size, TStyledSetting.Style, TStyledSetting.FontColor, TStyledSetting.Other];

With StyledSettings you can also use the DefaultStyledSettings constants that define which properties of a TTextSettings text object are taken from a style by default. DefaultStyledSettings has the following TStyledSettings value:

[TStyledSetting.Family, TStyledSetting.Size, TStyledSetting.Style, TStyledSetting.FontColor];

Keep in mind that all styled text properties listed in StyledSettings are taken from a style and cannot be changed manually. For example, if you set a new value to the FontColor property of a TTextSettings type text object, then the real updating of the font color takes place only if the StyledSettings property of this object does not contain TStyledSetting.FontColor. For more details, see the example in Setting Text Parameters in FireMonkey.

Notice that descendants of TTextControl, like TLabel, declare the StyledSettings property as published and, therefore, you can edit the values of this property in the Object Inspector. If you change, in the Object Inspector, the FontColor color from the default value (loaded from the style), then the Object Inspector automatically sets TStyledSetting.FontColor to False. But this works only at design time.

Note: Primitive controls (not having styles), like TText, ignore StyledSettings.

See Also