TCustomLabel.CalcWordWrapLength function
Calculates the maximum length of a word-wrapped line.
Declaration
function CalcWordWrapLength: IntegerDescription
Helper function which calculates the maximum length that the label text can have before word-wrapping sets in. The calculation is based on several criteria:
- when the text direction is horizontal (or flipped) and the label width is restricted by anchoring or Parent aligning, the maximum line length is determined by the control width.
- when the text direction is vertical (or flipped) and the label height is restricted by anchoring or Parent aligning, the maximum line length is determined by the label's height.
- If the
WordWrapLengthproperty has a positive value, the maximum line length is determined by this parameter. - In all other cases, the maximum line defaults to a very large value
(
cMaxLabelSize= 10000) so that the label can grow without being wrapped.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
