Sign in Join
FPDoc Onlineexperiment

TCustomLabel.WordWrapLength property

Member of TCustomLabelprotectedIn unit StdCtrls

Defines the maximum pixel of the label caption at which the text is wrapped to a new line.

Declaration

pascal
property WordWrapLength: Integer read FWordWrapLength write SetWordWrapLength default 0;

Description

WordWrapLength is an Integer property which determines the maximum line length (in pixels): When WordWrap is True and the Caption becomes wider than this value, the excess text is wrapped at the preceding word boundary to a new line.

The default value is 0 indicating that this property does not introduce any word-breaks by itself. Word-wraps then can occur only on the basis of other criteria (alignment to parent, anchoring to other controls, or constrained width).

This property was introduced to have a well-controlled wrapping parameter when the text is rotated. Label rotation can be achieved by giving the Font.Orientation property a non-zero value which is interpreted in units of 1/10 degree, positive in counter-clockwise orientation and zero pointing horizontally in the 3 o'clock direction.

See also

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