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.PreviewText Property

Specifies the preview text displayed within the font name combo box.

#Declaration

Delphi
property PreviewText: TCaption read; write;

#Property Value

Type
TCaption

#Remarks

When enabled (see the TcxFontPreview.Visible property), the font preview is displayed at the top of the combo box’s dropdown window. The TcxFontPreview.PreviewType property allows you to select the contents of the text displayed within the preview area (full alphabet, font name or custom text, defined by the TcxFontPreview.PreviewText property).

The TcxFontPreview.Alignment property specifies the preview text’s alignment within the preview area. You can access this property both at design and at run-time. Implement the code similar to the following to change the preview text programmatically:

//...
with cxFontNameComboBox1.Properties.FontPreview do
begin
  if PreviewText = '' then
    PreviewText := '1234567890';
end;
//...

The result of executing this code is shown below:

See Also