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 Class

Contains the preview area’s settings.

#Declaration

Delphi
TcxFontPreview = class(
    TPersistent
)

#Remarks

The TcxFontPreview object represents the preview area, located at the top of the combo box drop-down list. The preview area supports optional style buttons, allowing the user to apply bold, italic, underline or strikeout formatting to the selected font. Note: this is to help with selection only, since as its name suggests, the control is for selecting a font name, not a font.

Below is the screenshot of the font name combo box with the preview area highlighted using a red border:

Highlighted Preview Area Example

The PreviewType property specifies the type of preview used. The PreviewText specifies the custom preview string (if the PreviewType property is set to cxfpCustom). Use the Color property to customize the background color of the preview box. The ShowButtons property can be used to show and hide style-formatting buttons. The TcxFontPreview.Alignment property can be used to specify the alignment of the sample text within the preview box area.

#Inheritance

TObject
TPersistent
TcxFontPreview
See Also