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

# TCustomPanel

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

The base class for a general container which can hold other objects. It has a customizable border and a central text.

## Declaration

Source position: extctrls.pp line 1123

`type TCustomPanel = class(TCustomControl)`
`protected`
`class procedure WSRegisterClass; override;` |  | Registers this component class with the current WidgetSet.
`procedure AdjustClientRect(); override;` |  | Adjusts the specified rectangle to account for borders and bevels used on the control.
`class function GetControlClassDefaultSize; override;` |  | Gets the size used for a new instance of the class type.
`procedure CMParentColorChanged(); message;` |  | Handles a CM_PARENTCOLORCHANGED message for the control.
`function GetDefaultDockCaption; override;` |  | Returns the string for the dock caption, by default the control's Name.
`procedure Loaded; override;` |  | Performs actions needed when the component has finished loading in the LCL streaming mechanism.
`procedure RealSetText(); override;` |  | Stores the specified value as the Caption for the control.
`procedure Paint; override;` |  | Paints the panel including the bevels and caption defined for the control.
`procedure SetParentBackground(); override;` |  | Sets the value for the ParentBackground property.
`procedure UpdateParentColorChange;` |  | Updates the control to reflect changes to the ParentColor property.
`property ShowAccelChar: Boolean; [rw]` |  | Controls the display of accelerator or hot keys in the Caption for the panel.
`property VerticalAlignment: TVerticalAlignment; [rw]` |  | Vertical alignment for the caption text displayed on the panel.
`property WordWrap: Boolean; [rw]` |  | Indicates if the Caption can be word wrapped when painted.
`public`
`constructor Create(); override;` |  | Constructor for the class instance.
`property Align: TAlign;` |  | Specifies the placement of the control inside its Parent.
`property Alignment: TAlignment; [rw]` |  | Alignment - whether text is left or right justified, or centered.
`property BevelColor: TColor; [rw]` |  | Color used to draw bevels for the panel.
`property BevelInner: TPanelBevel; [rw]` |  | Determines the appearance of the Inner Bevel for the panel (whether raised, lowered, etc.).
`property BevelOuter: TPanelBevel; [rw]` |  | Determines the appearance of the Outer Bevel for the panel (whether raised, lowered, etc.).
`property BevelWidth: TBevelWidth; [rw]` |  | Width for a bevel on the panel in pixels.
`property Color: TColor;` |  | Contains the background color for the panel.
`property FullRepaint: Boolean; [rw]` |  | FullRepaint - if True, the panel needs to be fully repainted after each change.
`property ParentBackground: Boolean;` |  | Indicates if the background from the parent control is used to draw the background for the control.
`property ParentColor: Boolean;` |  | Indicates if the control is drawn using the color in the parent control.
`property TabStop: Boolean;` |  | Enables or disables navigation using the Tab key.
`end;`

## Inheritance

`TCustomPanel` |  | The base class for a general container which can hold other objects. It has a customizable border and a central text.
`TCustomControl` |  | The base class for windowed controls which paint themselves.
`TWinControl` |  | Implements a windowed control which can contain other child controls.
`TControl` |  | The base class for visible controls.
`TLCLComponent` |  | The base class for LCL components which have an associated widget.
`TComponent`
?
`TObject`

## Description

TCustomPanel is the base type for TPanel.

A Panel is a defined rectangular area on a form into which other components can be placed to group them functionally and geographically. TCustomPanel defines the positioning and beveling properties of any descendent classes, and provides methods for painting and writing text to the panel.