Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomGroupBox.Alignment Property

Specifies the caption text position.

#Declaration

Delphi
property Alignment: TcxCaptionAlignment read; write; default alTopLeft;

#Property Value

Type Default
TcxCaptionAlignment alTopLeft

#Remarks

Use the Alignment property to change the position of the group box’s caption text. The caption can be placed on any border and aligned within it. Additionally, the control’s caption can be placed in the center of its client area. This allows you to use the group box as a substitute for a panel control.

If the group box is painted in the native style (the Style.LookAndFeel.NativeStyle property is set to True), the caption text cannot be placed onto the right or left border and will be displayed on the top border instead.

The table below lists the values available for the Alignment property.

Value

Meaning

Example

alTopLeft

The caption text is placed on the top edge and left aligned.

alTopCenter

The caption text is placed on the top edge and centered.

alTopRight

The caption text is placed on the top edge and right aligned.

alBottomLeft

The caption text is placed on the bottom edge and left aligned.

alBottomCenter

The caption text is placed on the bottom edge and centered.

alBottomRight

The caption text is placed on the bottom edge and right aligned.

alLeftTop

The caption text is placed on the left edge and aligned to the top.

alLeftCenter

The caption text is placed on the left edge and centered.

alLeftBottom

The caption text is placed on the left edge and aligned to the bottom.

alRightTop

The caption text is placed on the right edge and aligned to the top.

alRightCenter

The caption text is aligned on the right edge and centered.

alRightBottom

The caption text is placed on the right edge and aligned to the bottom.

alCenterCenter

The caption text is centered within the client area of the control. Note that all borders now correspond to the edges of the control, thus making it suitable for use as a panel.

To apply the panel paint style to the group box control, set the PanelStyle.Active property to True.

The default value of the Alignment property is alTopLeft.

See Also