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

# TWinControl.RealSetText

Sets the text / caption for the control.

## Declaration

Source position: controls.pp line 2305

`protected procedure TWinControl.RealSetText(`
`const AValue: TCaption`
`); override;`

## Arguments

`AValue` |  | New value for the text / caption for the control.

## Description

RealSetText is an overridden method in TWinControl. It ensures that the new value is applied to the widgetset class when its Handle has been allocated, and the control size is adjusted when needed/enabled. The inherited method is called to apply AValue to the Text and/or Caption properties for the control.

## See also

TWinControl.WSSetText |  | Sets the value for the Text property in the widgetset class.
TControl.Caption |  | The text displayed for the control.
TControl.Text |  | String with the text or caption for the control.
TControl.RealSetText |  | Sets the value for the Caption property.
TControl.RealGetText |  | Returns the Caption property.
TControl.AdjustSize |  | Smart way to DoAutoSize.