Back to Devexpress

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

windowsforms-4831-controls-and-libraries-spell-checker-examples-how-to-turn-on-the-check-as-you-type-mode.md

latest1.8 KB
Original Source

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

  • Jan 13, 2020

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:

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:

csharp
spellChecker1.SetCanCheckText (editorName, false);
vb
spellChecker1.SetCanCheckText(editorName, False)

See Also

How to: Check Spelling of a Grid Cell