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

# TCustomPanel.VerticalAlignment

Vertical alignment for the caption text displayed on the panel.

## Declaration

Source position: extctrls.pp line 1154

`protected property TCustomPanel.VerticalAlignment : TVerticalAlignment read FVertAlignment write SetVertAlignment default taVerticalCenter;`

## Description

VerticalAlignment is a TVerticalAlignment property which controls the vertical alignment for the Caption displayed on the panel. The default value for the property is taVerticalCenter, and causes the caption text to be centered vertically on the panel. Use taAlignTop to align caption text to the top of the panel. Use taAlignBottom to align caption text to the bottom of the panel.

Changing the value for the property causes the Invalidate method to be called, and the panel is redrawn.

VerticalAlignment is used in the Paint method to determine the text layout/style applied when the value in Caption is drawn on the Canvas for the control.

Use Alignment to control the horizontal alignment for the Caption text displayed for the panel.

Use Align to position the panel along one of the edges on the parent control or form.

## Version info

Added in LCL version 2.3, and available since LCL version 3.0.

## See also

TCustomPanel.Align |  | Specifies the placement of the control inside its Parent.
TCustomPanel.Alignment |  | Alignment - whether text is left or right justified, or centered.
TCustomPanel.Paint |  | Paints the panel including the bevels and caption defined for the control.
TControl.Caption |  | The text displayed for the control.
TVerticalAlignment