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

TcxFontPreview.Alignment Property

Defines the alignment of the preview text within the preview area.

#Declaration

Delphi
property Alignment: TAlignment read; write; default taCenter;

#Property Value

Type Default
TAlignment taCenter

#Remarks

The Alignment property specifies the alignment of the preview text displayed within the font name combo box. You may display the text on the left, right or centered. The alignment property can be read and modified at design and at run-time. The following code changes preview text alignment:

//...
with cxFontNameComboBox1.Properties.FontPreview do
begin
  if Alignment <> taCenter then
    Alignment := taCenter;
end;
//...

The following screenshots show different alignment settings:

Property’s Value Meaning Effect
taLeft Preview text is left aligned.
taCenter Preview text is centered.
taRight Preview text is right aligned.

The default value of the Alignment property is taCenter.

See Also