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

# TCustomFrame.SetParentBackground

Sets the value for the ParentBackground property.

## Declaration

Source position: forms.pp line 327

`protected procedure TCustomFrame.SetParentBackground(`
`const AParentBackground: Boolean`
`); override;`

## Arguments

`AParentBackground` |  | New value for the ParentBackground property.

## Description

Ensures that Color is changed to the value in the Parent control when the property is set to True. Color is set to clDefault when the property is set to False. Calls UpdateOpaque to ensure that the csOpaque style flag is applied to the ControlStyle property as needed.

## See also

TCustomFrame.ParentBackground |  | Indicates if the control uses the background from the parent.