Skip to main content
A newer version of this page is available. .

Font Dialog

The Font dialog enables end-users to format text (specify different font settings: character size, style, background and foreground colors, etc.).

RTEFontDialog

End-users can invoke the Font dialog using the Font group’s dialog box launcher on the Home ribbon tab. Refer to the How to: Create the RichEditControl with a Ribbon UI topic for details on how to provide the Ribbon UI for the RichEditControl.

RichEdit_ShowFontDialog_RibbonCaptionButton

You can also invoke this dialog from the context menu or by pressing CTRL+D.

RTEFontCMenu

Executing the ShowFontFormCommand command invokes the Font dialog as well.

To programmatically format different settings of font, you can use the SubDocument.BeginUpdateCharacters and SubDocument.EndUpdateCharacters pair of methods. They provide access to the CharacterProperties interface, enabling you to get character formatting or to change it. To get an example, see How to: Change Formatting of Selected Text.

To customize the default Font dialog (modify captions, set default dialog values, implement custom validation, etc.) or substitute it with completely new dialog, handle the RichEditControl.FontFormShowing event.

Tip

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E5219.