Vcl.StdCtrls.TCustomLabel.AutoSize

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property AutoSize: Boolean read FAutoSize write SetAutoSize default True;

C++

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

Properties

Type Visibility Source Unit Parent
property protected
Vcl.StdCtrls.pas
Vcl.StdCtrls.hpp
Vcl.StdCtrls TCustomLabel

Description

Determines whether the size of the label automatically resizes to accommodate the text.

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

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

See Also

Code Examples