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

# TCustomPanel.ParentBackground

Indicates if the background from the parent control is used to draw the background for the control.

## Declaration

Source position: extctrls.pp line 1166

`public property TCustomPanel.ParentBackground : Boolean default True;`

## Description

When ParentBackground is True, the control uses the background from the parent color (including any theme drawing features from ThemeServices).

ParentBackground is used in conjunction with the ControlStyle property. Changing the value in ParentBackground causes the ControlStyle property to be updated to reflect the property setting. When the property is set to True, the value csOpaque is excluded from ControlStyle to allow the default background to be drawn. When the property is set to False, the value csOpaque is included in the ControlStyle property.

The default value for the property is True.

## See also

TControl.ControlStyle |  | Contains style flags which control the features or behaviors enabled for the control.
TControl.ParentBackground |  | Indicates if the control uses the background color from its Parent control.