In This Topic
Spelling dialog box is available whenever a spelling error has been detected by the spell checker. It allow users to add, change or ignore the spelling suggestions for a word.
To enable the Spell Dialog, use the method to link the SpellChecker component to a control derived from Windows.Forms.TextBoxBase. For example, the following code links the C1SpellChecker component to a RichTextBox control:
While spell checking, the C1SpellChecker will automatically highlight misspelled words when the user interacts with the built-in Spell Dialog.
Custom Spelling Dialog
The Spell Dialog can be customized three different ways:
- Create an instance of the C1SpellDialog class, attach event handlers, then pass the instance of the dialog to the CheckControl method. For example:
Note that the code above assumes that you have added a Button control and a StatusStrip control with a ToolStripStatusLabel to your form at design time.
OR
- Create a new spell-checking dialog class that implements the ISpellDialog interface. Then pass an instance of the new dialog to the CheckControl method.
OR
- If you need more extensive customization, you can create your own spell dialog box and use that instead of the built-in one.
Note: The samples that ship with the C1SpellChecker include a CustomSpellDialog application that includes the source code for two dialogs that you can use as a base for creating your own spell dialog boxes.