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

# TCustomLabel.TextChanged

Performs actions when the CM_TEXTCHANGED message is handled for the control.

## Declaration

Source position: stdctrls.pp line 1579

`protected procedure TCustomLabel.TextChanged; override;`

## Description

TextChanged is an overridden method used to perform actions needed when the CM_TEXTCHANGED message is handled for the control. TextChanged calls Invalidate to request the control to be redrawn. UpdateSize is called to perform auto-sizing, and recalculate the dimensions for the control. The font may be re-sized when OptimalFill is enabled.

TextChanged does not call the inherited method.

## See also

TCustomLabel.UpdateSize |  | Adjusts the size for the control based on settings in AutoSize and OptimalFill.
TCustomLabel.OptimalFill |  | If True, the font size is adjusted for optimal fill of the available space.
TControl.Invalidate |  | Causes a delayed Repaint of the control by marking its visible area of the control as invalid.
TControl.TextChanged |  | Performs actions needed when the value for the Text property has been changed.