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

TCustomPanel.Color

Contains the background color for the panel.

Declaration

Source position: extctrls.pp line 1126

public property TCustomPanel.Color : TColor
  default clDefault;

Description

Color is a TColor property with the background color for the panel.

The default value for Color is determined by the UseCLDefault compiler define. When UseCLDefault is defined, the default value is clDefault, and the color will need to be resolved using the GetDefaultColor method. Convenience routines which obtain the color by resolving clDefault and ParentColor are also provided in TControl.GetColorResolvingParent and TControl.GetRGBColorResolvingParent. If UseCLDefault is not defined, the the default value is clWindow.

Setting an explicit value in Color causes both ParentColor and ParentBackground to be set to False, and the control is redrawn.

Set ParentBackground or ParentColor to True to use the background color from the Parent control, making the panel transparent when drawn.

See also

TCustomPanel.ParentBackground

  

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

TCustomPanel.ParentColor

  

Indicates if the control is drawn using the color in the parent control.

TControl.Color

  

The background color for the control.


Version 3.2 Generated 2024-02-25 Home