TCustomPanel.SetParentBackground procedure
Sets the value for the ParentBackground property.
Declaration
procedure SetParentBackground(const AParentBackground: Boolean)
; overrideArguments
AParentBackground | When True, the panel is drawn with transparency. |
Description
SetParentBackground is an overridden method used to set the
value for the ParentBackground property. SetParentBackground ensures that the
ControlStyle property is updated to include or omit the values
which control the opacity for the control. When AParentBackground contains
True, the value csParentBackground is included in ControlStyle. When
AParentBackground contains
False, csParentBackground is excluded from
ControlStyle.
The UpdateParentColorChange method is called to update ControlStyle to reflect the values in the ParentColor or ParentBackground properties. If either ParentColor or ParentBackground are set to True, csOpaque is excluded from ControlStyle and the control becomes transparent. When both properties are set to False, csOpaque is included in ControlStyle and the control is drawn using the value in Color as the background color.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
