RichTextBox: Using a customizable SpellCheckDialog with multiple RichTextBoxes

An unique advantage of TX Spell .NET is that a single instance of the spell check component can be used to provide spell checking capabilities to an unlimited number of controls.

The source code is contained in the following directories:

Using a customizable SpellCheckDialog with multiple RichTextBoxes

If a customizable SpellCheckDialog is used, the Proofing.TXSpellChecker.SpellCheckDialogClosing event can be used to link to another RichTextBox when the current control has been checked completely. This allows the usage of one instance of the dialog to spell check an unlimited number of RichTextBoxes.

private void txSpellChecker1_SpellCheckDialogClosing(object sender,
	TXTextControl.Proofing.SpellCheckDialogClosingEventArgs e)
	curRichTextBox.Select(0, 0);
	if (e.StateManager.NextIncorrectWord != null)
	e.Cancel = SetNextTextControl(e.StateManager, curRichTextBox);
[Visual Basic]
Private Sub txSpellChecker1_SpellCheckDialogClosing(sender As Object, _
	e As TXTextControl.Proofing.SpellCheckDialogClosingEventArgs)
	curRichTextBox.[Select](0, 0)
	If e.StateManager.NextIncorrectWord IsNot Nothing Then
	End If
	e.Cancel = SetNextTextControl(e.StateManager, curRichTextBox)
End Sub

Start the sample application and click on the button Spell Check Dialog. One instance of the dialog checks each of the four RichTextBoxes.