FMX.Objects.TText.AutoSize

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property AutoSize: Boolean read FAutoSize write SetAutoSize default False;

C++

__property bool AutoSize = {read=FAutoSize, write=SetAutoSize, default=0};

Properties

Type Visibility Source Unit Parent
property published
FMX.Objects.pas
FMX.Objects.hpp
FMX.Objects TText

Description

Determines whether the size of the TText control automatically resizes to accommodate the text.

Use the AutoSize property to make the TText control adjust its size automatically, so the client area accommodates the height and width of the text. When AutoSize is False, the TText control is fixed in size. When AutoSize is True, the size of the TText control readjusts whenever the text changes. The size of the TText control is also readjusted when the Font property changes.

When WordWrap is True, the width of the TText control is fixed. If AutoSize is also True, changes to the text cause the TText control to change in height. When AutoSize is True and WordWrap is False, the font determines the height of the TText control, and changes to the text cause the label to change in width.

Tip: Changing the AutoSize property has effect only if HorzTextAlign is set to Leading and VertTextAlign is also set to Leading.

See Also