The built-in spell dialog checks the list when it finds a misspelled word. If a match is found, the misspelled word is replaced with the corresponding list entry. The as-you-type mechanism looks for matches whenever the user types a character that is not a letter or a digit. If a match is found, the text is replaced with the corresponding list entry.
Use the AutoReplaceList property to spell-check a list of words, and if a match is found on the list then the misspelled word is replaced with the corresponding list entry as-you-type.
For example, you can monitor spelling on a Windows.Forms.RichTextBox control using this list. To see this feature in action, complete the following steps:
Note that the C1SpellChecker component will appear below the form, not on it.
This code builds the following list using the AutoReplaceList.Add method:
Misspelled word | Correction word |
---|---|
because | because |
cant | can't |
receive | receive |
the | the |
wont | won't |
Then it activates as-you-type spell-checking on the RichTextBox control using the SetActiveSpellChecking method.
Run the application and observe the following: