TX Spell .NET for Windows Forms

RichTextBox and TextBox

Topic

The standard text controls of Windows Forms have no spell checking of their own, but TX Spell .NET can check their text. Two short tutorials add it to a RichTextBox, and to a TextBox along the way: one marks misspelled words while the user types, the other opens the spell check dialog. Both need only the TX Spell .NET package, not TX Text Control.

The Spelling dialog of TX Spell .NET over a RichTextBox, showing the misspelled word "sampke" with its suggestions.

How It Works

With TX Text Control, the editor does most of the work. With a RichTextBox or a TextBox, your code does it:

  • You pass the text. The Check method of the TXSpellChecker checks a string and lists the incorrect words with their positions in IncorrectWords.
  • You mark the words. A RichTextBox can color them; a TextBox can report that its text contains mistakes.
  • You apply the corrections. The spell check dialog tells your code which word the user changed, through the IncorrectWordChanging event, and your code changes the text.

Pages in This Section