Modify Spell Check Dialog

TX Spell .NET comes with a very flexible, dynamic and customizable spell check dialog. This dialog can be easily connected to a TXTextControl.TextControl or used with any other control that should be spell checked. The advantage of this dialog over the pre-defined dialog when used in combination with TX Text Control is that the functionality can be changed, buttons can be added or removed and you can change the overall behavior.

The source code for all steps is contained in the following directories:

  • %USERPROFILE%\My Documents\TX Spell 7.0.NET for Windows Forms\Samples\WinForms\CSharp\Modify SpellCheckDialog
  • %USERPROFILE%\My Documents\TX Spell 7.0.NET for Windows Forms\Samples\WinForms\VB.NET\Modify SpellCheckDialog

The customizable SpellCheckDialog contains various button collections that can be used to add or remove buttons from the dialog. For example, the DialogButtonCollection collection allows you to remove the button to open the spell checking options dialog. Additionally, this collection can be used to add your own custom buttons with custom functionality. The following code shows how to change the text of the options button in the SpellCheckDialog:

txSpellChecker1.SpellCheckDialog.OptionButtons[0].Text = checkBox1.Checked ? "My Options..." : "Options...";
txSpellChecker1.SpellCheckDialog.OptionButtons(0).Text = If(checkBox1.Checked, "My Options...", "Options...")

Start the sample application in Visual Studio. A dialog is shown that can be used to customize the SpellCheckDialog. Use the checkboxes to enable a custom options dialog, to change the font of the dialog or to enable the Add To Dictionary Button.

Click on Spell Check Dialog to open the customized dialog. Close it and change some settings in order to open it again to see that the dialog reflects these changes.