Sign in Join
FPDoc Onlineexperiment

TLabel.Alignment property

Member of TLabelpublishedIn unit StdCtrls

Horizontal text justification in the control (left- or right-justified, or centered).

Declaration

pascal
property Alignment:;

Description

Alignment is a TAlignment property which controls the horizontal justification of the text displayed in the control. The default value for the property is taLeftJustify. When a new value is assigned to the Alignment property, the Invalidate method is called to repaint the control.

Alignment (and other properties) are used in the Paint method when the text is rendered to the Canvas for the control. It is also used in UpdateSize when right alignment needs to be considered for an auto-sized or optimal-filled control.

Use the Layout property to control the vertical alignment of the text displayed in the control.

Use OptimalFill to indicate if the font height can be adjusted to fill the client area for the control.

This description is the one of StdCtrls.TCustomLabel.Alignment.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.