Skip to main content

TcxFontPreview.PreviewText Property

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

Declaration

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