Skip to main content

TcxFontPreview Class

Contains the preview area’s settings.

Declaration

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