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

# TCustomButton.TextChanged

Performs actions needed when the CM_TEXTCHANGED message is handled in the control.

## Declaration

Source position: stdctrls.pp line 1242

`protected procedure TCustomButton.TextChanged; override;`

## Description

TextChanged is an overridden method used to performs actions needed when the CM_TEXTCHANGED message is handled in the control.

TextChanged calls InvalidatePreferredSize and causes the preferred height and width for the control to be recalculated. When Parent has been assigned and its AutoSize property is set to True, the AdjustSize method in Parent is called. The AdjustSize method for the control is called to resize the control or update control flags when delayed auto-sizing is in use.

TextChanged calls the inherited method prior to exit.

## See also

TControl.TextChanged |  | Performs actions needed when the value for the Text property has been changed.
TControl.AdjustSize |  | Smart way to DoAutoSize.
TControl.AutoSizeDelayed |  | Returns True if auto-sizing has been delayed until some other process is complete.