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

# TControl.CMParentColorChanged

Handles a CM_PARENTCOLORCHANGED message for the control.

## Declaration

Source position: controls.pp line 1449

`protected procedure TControl.CMParentColorChanged(`
`var Message: TLMessage`
`); message;`

## Arguments

`Message` |  | Message handled in the method.

## Description

CMParentColorChanged ensures that the Color property is updated when the message is received for the control. The property value from the Parent control is stored in Color when ParentColor is set to True. No actions are performed in the method when ParentColor is set to False.

## See also

TControl.Color |  | The background color for the control.
TControl.ParentColor |  | Use the Color from the Parent control, when enabled.
TControl.Parent |  | The control within which the control is shown.
TLMessage |  |