[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'StdCtrls' (#lcl)

TCustomLabel.WordWrap

Allows the caption to wrap to multiple lines when it is longer than the available Width.

Declaration

Source position: stdctrls.pp line 1601

protected property TCustomLabel.WordWrap : Boolean
  read FWordWrap
  write SetWordWrap
  default False;

Description

WordWrap is a Boolean property which indicates if the caption in the control can be wrapped to multiple lines when its length exceeds the value in Width. The default value for the property is False.

When a new value is assigned to the property, the Invalidate and UpdateSize methods are called to auto-size and repaint the control.

When WordWrap is False, the text is truncated at the right boundary when it is too long for the control Width. When WordWrap is True and AutoSize is True, the maximum Width is determined by anchoring the left and right sides for the control to its Parent.

See also

TCustomLabel.AutoSize

  

Enables or disables auto-sizing the control to its content.

TCustomLabel.UpdateSize

  

Adjusts the size for the control based on settings in AutoSize and OptimalFill.

TControl.Width

  

The horizontal size for the control.

TControl.Invalidate

  

Causes a delayed Repaint of the control by marking its visible area of the control as invalid.


Version 3.2 Generated 2024-02-25 Home