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

# TCustomGroupBox.SetParentBackground

Sets the value for the ParentBackground property.

## Declaration

Source position: stdctrls.pp line 173

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

## Arguments

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

## Description

SetParentBackground is an overridden method in TCustomGroupBox used to set the value for the ParentBackground property. It calls the inherited method on entry.

When the property value is set to True and ParentColor is enabled, the Color property in the Parent control is assigned to the Color property for the group box. Otherwise, clDefault is assigned to the Color property.

SetParentBackground calls the UpdateOpaque method to ensure that the ControlStyle flags for the control reflect the transparency needed to draw the parent background.

## See also

TCustomGroupBox.SetParentBackground |  | Sets the value for the ParentBackground property.
TCustomGroupBox.UpdateOpaque |  | Updates the control style when the parent background is used.
TControl.ParentColor |  | Use the Color from the Parent control, when enabled.
TControl.Parent |  | The control within which the control is shown.
clDefault |  | The default color of a given control.