Skip to main content

How to: Turn On the Check-As-You-Type Mode

If you wish to highlight a misspelled word immediately after you type it, then set the SpellChecker.SpellCheckMode value to the SpellCheckMode.AsYouType option. You can specify the CheckAsYouTypeOptions.Color and CheckAsYouTypeOptions.UnderlineStyle for the highlighted word.

To turn this mode on immediately when the control gets focus, specify the SpellChecker’s SpellChecker.ParentContainer property and set the CheckAsYouTypeOptions.CheckControlsInParentContainer value to true.

By default, with this mode turned on, the misspelled words are indicated as shown in the following picture:

UnderlineStyle.WavyLine

Tip

You can prevent check spelling in a specific control on the form. Call the SpellChecker.SetCanCheckText method to exclude the required editor, as shown below:

spellChecker1.SetCanCheckText (editorName, false);
See Also