Skip to content

CommonDialogFontConstants Enumeration

Description

Options for a Font dialog box.

Members

Member Description
xtpCFANSIOnly Specifies that the dialog box allows only a selection of the fonts that use the Windows character set. If this flag is set, the user won't be able to select a font that contains only symbols.
xtpCFApply Enables the Apply button on the dialog box.
xtpCFBoth Causes the dialog box to list the available printer and screen fonts.
xtpCFEffects Specifies that the dialog box enables strikethrough, underline, and color effects.
xtpCFFixedPitchOnly Specifies that the dialog box selects only fixed-pitch fonts.
xtpCFForceFontExist Specifies that an error message box is displayed if the user attempts to select a font or style that doesn't exist.
xtpCFHelpButton Causes the dialog box to display a Help button.
xtpCFLimitSize Specifies that the dialog box selects only font sizes within the range.
xtpCFNoFaceSel No font name selected.
xtpCFNoSimulations Specifies that the dialog box doesn't allow graphic device interface (GDI) font simulations.
xtpCFNoSizeSel No font size selected.
xtpCFNoStyleSel No style was selected.
xtpCFNoVectorFonts Specifies that the dialog box doesn't allow vector-font selections.
xtpCFPrinterFonts Causes the dialog box to list only the fonts supported by the printer.
xtpCFScalableOnly Specifies that the dialog box allows only the selection of fonts that can be scaled.
xtpCFScreenFonts Causes the dialog box to list only the screen fonts supported by the system.
xtpCFTTOnly Specifies that the dialog box allows only the selection of TrueType fonts.
xtpCFBoth and xtpCFScalableOnly flags should also be set. Additionally displays fonts that are set to Hide in Fonts Control Panel.
xtpCFInactiveFonts Disables the Script combo box.
xtpCFNoScriptSel Causes the Font dialog box to list only horizontally oriented fonts.

Remarks

These flags are used to set options for a Font dialog box using the CommonDialog.Flags when the CommonDialog.ShowFont method is called.

You can set more than one flag for a dialog box using the Or operator. For example:

CommonDialog1.Flags = xtpCFScreenFonts Or xtpCFApply

Note: You must set the CommonDialog.Flags property to xtpCFScreenFonts, xtpCFPrinterFonts, or xtpCFBoth before displaying the Fonts dialog box. Otherwise, the error "No Fonts Exist" occurs.

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.