![]() ![]() | ||
As discussed in the In Depth section of this chapter, the FontDialog class displays a dialog box that lets the user select a font. It returns a Font object in the Font property, and a Color object in the Color property. Font dialogs are supported by the FontDialog class. Here is the class hierarchy for that class:
Object MarshalByRefObject Component CommonDialog FontDialog
You can find the notable public properties of FontDialog objects in Table 9.15, the notable public methods in Table 9.16, and the notable public events in Table 9.17.
Property |
Means |
---|---|
AllowSimulations |
Gets/sets whether the dialog box allows graphics device interface font simulations. |
AllowVectorFonts |
Gets/sets whether the dialog box allows vector font selections. |
AllowVerticalFonts |
Gets/sets whether the dialog box displays both vertical and horizontal fonts or only horizontal fonts. |
Color |
Gets/sets the selected font color. |
FixedPitchOnly |
Gets/sets whether the dialog box allows only the selection of fixed-pitch fonts. |
Font |
Gets/sets the selected font. |
FontMustExist |
Gets/sets whether the dialog box specifies an error condition if the user attempts to select a font or style that does not exist. |
MaxSize |
Gets/sets the maximum point size a user can select. |
MinSize |
Gets/sets the minimum point size a user can select. |
ShowApply |
Gets/sets whether the dialog box contains an Apply button. |
ShowColor |
Gets/sets whether the dialog box displays the color choice. |
ShowEffects |
Gets/sets whether the dialog box contains controls that allow the user to specify strikethrough, underline, and text color options. |
ShowHelp |
Gets/sets whether the dialog box displays a Help button. |
Method |
Means |
---|---|
Reset |
Resets all dialog options to default values. |
ShowDialog |
Shows the dialog. |
Event |
Means |
---|---|
Apply |
Occurs when the user clicks the Apply button. |
HelpRequest |
Occurs when the user clicks the Help button. |
![]() ![]() | ||