# TXSpellChecker Class

> The TXSpellChecker class implements a component with spell checking features. It allows to set general spell checking settings by using an options dialog, to invoke a customizable SpellCheckDialog that can be connected to different types of controls (e.g. TXTextControl.TextControl and System.Windows.Forms.RichtTextBox) and to create a spell checking context menu by using the TXSpellChecker.GetMenuItems method. Currently, TXTextControl (version 17.0 and better) provides the TextControl.SpellChecker Property to connect the TXSpellChecker with its TextControl component. To invoke the internal or an own spell check context menu on right clicking a misspelled word, the TextControl.SpellCheckContextMenuStrip Property must be set. The TXSpellChecker class is inherited from the System.ComponentModel.Component class. The following describes only the properties, methods and events defined through the TXSpellChecker class. For a list of properties, methods and events inherited from the System.ComponentModel.Component class see the .NET Framework reference.

- **Product:** TX Spell .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Namespace:** `TXTextControl.Proofing`
- **Package:** `TXTextControl.TXSpell.WinForms.SDK` (assembly `TXSpell.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXSpell.Windows.Forms.dll` from the setup
- **Inherits:** `System.ComponentModel.Component`
- **Path:** TX Spell .NET for Windows Forms > Reference > TXTextControl.Proofing > TXSpellChecker Class
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/llms-full.txt

---

## On This Page

- [Description](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/#description)
- [Syntax](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/#syntax)
- [Examples](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/#examples)
- [Members](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/#members)

---

## In This Section

- [TXSpellChecker.AvailableDictionaries Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/availabledictionaries-property/llms.txt): Gets a list of all available dictionaries in the default dictionary folder.
- [TXSpellChecker.AvailableHyphenationLists Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/availablehyphenationlists-property/llms.txt): Gets a list of all available hyphenation lists of the default hyphenation lists folder.
- [TXSpellChecker.AvailableSynonymLists Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/availablesynonymlists-property/llms.txt): Gets a list of all available synonym lists of the default synonym lists folder.
- [TXSpellChecker.Check Method](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/check-method/llms.txt): Checks text for spelling errors and fills the IncorrectWordCollection at TXSpellChecker.IncorrectWords with all incorrect words. The first implementation uses selected dictionaries of the DictionaryCollection at TXSpellChecker.Dictionaries. The second implementation uses selected dictionaries of the TXSpellChecker.Dictionaries DictionaryCollection and the default dictionary folder where the dictionary's language equals to the defined language parameter. Only those dictionaries are used whose Dictionary.IsSpellCheckingEnabled properties are set to true.
- [TXSpellChecker Constructor](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/constructor/llms.txt): Initializes a new instance of the TXSpellChecker class.
- [TXSpellChecker.Create Method](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/create-method/llms.txt): Initializes the resources of a newly instantiated TXSpellChecker object. This method must be called before using the object. If TX Spell .NET is connected to a TXTextControl.TextControl instance, this method is called implicitely and must not be called separately.
- [TXSpellChecker.CreateSuggestions Method](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/createsuggestions-method/llms.txt): Determines suggestions for a specific incorrect word by using selected dictionaries of the DictionaryCollection at TXSpellChecker.Dictionaries and fills the results into the SuggestionCollection at TXSpellChecker.Suggestions. If no maximum number of suggestions is set, all created suggestions are added to TXSpellChecker.Suggestions. Otherwise, only the first maximum number of suggestions are determined. The second and fourth implementation uses selected dictionaries of the TXSpell.Dictionaries DictionaryCollection and the default dictionary folder where the dictionary's language equals to the defined language parameter. Only those dictionaries are used where the Dictionary.IsGetSuggestionsEnabled property is set to true.
- [TXSpellChecker.CreateSynonyms Method](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/createsynonyms-method/llms.txt): Returns groups of synonyms that represent equivalent expressions for a specific text. The first implementation uses selected synonym lists of the SynonymListCollection at TXSpellChecker.SynonymLists. The second implementation uses selected synonym lists of the TXSpellChecker.SynonymLists collection and the default synonym lists folder where the synonym list's language equals to the defined language parameter. The last overload creates synonym groups for a specific synonym list. Only those synonym lists are used whose SynonymList.IsCreateSynonymsEnabled properties are set to true.
- [TXSpellChecker.DetectableLanguageScopes Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/detectablelanguagescopes-property/llms.txt): Gets or sets a list of all languages that are used to detect language scopes in a text.
- [TXSpellChecker.DetectLanguageScopes Method](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/detectlanguagescopes-method/llms.txt): Detects language scopes in a text and fills the results into the LanguageScopeCollection at TXSpellChecker.LanguageScopes.
- [TXSpellChecker.DialogButtonClicked Event](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/dialogbuttonclicked-event/llms.txt): Occurs when a dialog button of the built-in SpellCheckDialog was clicked. The DialogButtonHandler receives an argument of type DialogButtonEventArgs containing data related to this event.
- [TXSpellChecker.Dictionaries Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/dictionaries-property/llms.txt): Gets a collection of all added and validated dictionaries. The property's value is an object of type DictionaryCollection.
- [TXSpellChecker.DictionariesDirectoryPath Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/dictionariesdirectorypath-property/llms.txt): Gets or sets the path to the default dictionaries folder. The default value is "(Auto)" that determines the Dictionaries directory at the application's root folder or in the \Assembly\ subdirectory in the development machine's TX Spell .NET installation directory.
- [TXSpellChecker.DictionaryAdded Event](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/dictionaryadded-event/llms.txt): Occurs when a dictionary was added to the TXSpellChecker.Dictionaries DictionaryCollection. The DictionaryAddedHandler receives an argument of type DictionaryAddedEventArgs containing data related to this event.
- [TXSpellChecker.DictionaryRemoved Event](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/dictionaryremoved-event/llms.txt): Occurs when a dictionary was removed from the TXSpellChecker.Dictionaries DictionaryCollection. The DictionaryRemovedHandler receives an argument of type DictionaryRemovedEventArgs containing data related to this event.
- [TXSpellChecker.GetHyphenationPoint Method](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/gethyphenationpoint-method/llms.txt): Returns the next hyphenation point for a specific word right before a defined divide position. Using the first implementation that point is caluclated by applying the default hyphenation list. The second implementation uses a hyphenation list of the TXSpellChecker.HyphenationLists collection or a list from the default hyphenation lists folder that corresponds to the specified language parameter (second implementation). If there is no hyphenation point before that divide position and the position is less the word length, the method returns 0. For divide positions greater than or equal to the number of word characters, the method returns the word length.
- [TXSpellChecker.GetHyphenationPoints Method](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/gethyphenationpoints-method/llms.txt): Returns an array of all hyphenation points for a word. Using the first implementation these points are caluclated by applying the default hyphenation list. The second implementation uses a hyphenation list of the TXSpellChecker.HyphenationLists collection or a list from the default hyphenation lists folder that corresponds to the specified language parameter (second implementation).
- [TXSpellChecker.GetMenuItems Method](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/getmenuitems-method/llms.txt): Returns an array of MenuItems, which are used to create a custom spell check ContextMenu.
- [TXSpellChecker.HyphenationLanguage Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/hyphenationlanguage-property/llms.txt): Gets or sets the name of a hyphenation list that is located at the default hyphenation lists folder. When using the HyphenationLanguage property, the Hyphenation.IsSelectedAsDefault property of the chosen hyphenation list is set to true. The default value is "(Auto)".
- [TXSpellChecker.HyphenationLists Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/hyphenationlists-property/llms.txt): Gets a collection of all added hyphenation dictionaries. The property's value is an object of type HyphenationListCollection.
- [TXSpellChecker.HyphenationListsDirectoryPath Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/hyphenationlistsdirectorypath-property/llms.txt): Gets or sets the path to the default hyphenation lists folder. The default value is "(Auto)" that determines the HyphenationLists directory at the application's root folder or in the \Assembly\ subdirectory in the development machine's TX Spell .NET installation directory.
- [TXSpellChecker.IgnoreCase Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/ignorecase-property/llms.txt): Gets or sets a value of type IgnoreCaseSettings determining if and how the case of a word is ignored while spell checking. The default value is AllUpper | WordBeginUpper.
- [TXSpellChecker.IgnoreWord Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/ignoreword-property/llms.txt): Gets or sets a value of type IgnoreWordSettings determining when a word should not be spell checked. The default value is InUpperCase | IsEmail | IsURL | WithNumbers.
- [TXSpellChecker.IncorrectWordChanging Event](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/incorrectwordchanging-event/llms.txt): Occurs when an object of type IncorrectWord is changing by spell check context menu or spell check dialog operations. The IncorrectWordChangingHandler receives an argument of type IncorrectWordChangingEventArgs containing data related to this event.
- [TXSpellChecker.IncorrectWords Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/incorrectwords-property/llms.txt): Gets a collection of all incorrect words that were detected by the last call of the TXSpellChecker.Check method. The property's value is an object of type IncorrectWordCollection.
- [TXSpellChecker.Language Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/language-property/llms.txt): Gets or sets the name of a dictionary that is located at the default dictionary folder. Using the Language property, the Dictionary.IsSelectedAsDefault property of the chosen dictionary is set to true. The default value is "(Auto)".
- [TXSpellChecker.LanguageRecognitionDirectoryPath Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/languagerecognitiondirectorypath-property/llms.txt): Gets or sets the path to the language recognition folder that provides the languageRecognition.resources file which is required to detect language scopes in a text. The default value is "(Auto)" that determines the LanguageRecognition directory at the application's root folder or in the \Assembly\ subdirectory in the development machine's TX Spell .NET installation directory.
- [TXSpellChecker.LanguageScopes Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/languagescopes-property/llms.txt): Gets a collection of all detected language scopes. The property's value is an object of type LanguageScopeCollection.
- [TXSpellChecker.MenuItemClicked Event](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/menuitemclicked-event/llms.txt): Occurs when a MenuItem is clicked. The MenuItemClickedHandler receives an argument of type MenuItemClickedEventArgs containing data related to this event.
- [TXSpellChecker.MisspelledWordChanging Event](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/misspelledwordchanging-event/llms.txt): Occurs when an object of type TXTextControl.MisspelledWord is changing by spell check context menu or spell check dialog operations. The MisspelledWordChangingHandler receives an argument of type MisspelledWordChangingEventArgs containing data related to this event.
- [TXSpellChecker.OptionsDialog Method](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/optionsdialog-method/llms.txt): Invokes the built-in dialog box to define spell check, create suggestions, hyphenation and create synonyms settings.
- [TXSpellChecker.OptionsDialogOpening Event](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/optionsdialogopening-event/llms.txt): Occurs when a the built-in options dialog is invoked by the TXSpellChecker.OptionsDialog method or clicking the Options... button of the built-in SpellCheckDialog. The OptionsDialogOpeningHandler receives an argument of type OptionsDialogOpeningEventArgs containing data related to this event.
- [TXSpellChecker.SpellCheckDialog Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/spellcheckdialog-property/llms.txt): Gets an object of type SpellCheckDialog that is used to modify and show the built-in SpellCheckDialog.
- [TXSpellChecker.SpellCheckDialogClosing Event](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/spellcheckdialogclosing-event/llms.txt): Occurs when the built-in spell check dialog is closing. The SpellCheckDialogClosingHandler receives an argument of type SpellCheckDialogClosingEventArgs containing data related to this event.
- [TXSpellChecker.SpellCheckDialogOpening Event](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/spellcheckdialogopening-event/llms.txt): Occurs when the built-in spell check dialog is invoked using the SpellCheckDialog.Show method. The SpellCheckDialogOpeningHandler receives an argument of type SpellCheckDialogOpeningEventArgs containing data related to this event.
- [TXSpellChecker.SpellingCorrectionUIProvider Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/spellingcorrectionuiprovider-property/llms.txt): Gets an object of type SpellingCorrectionUIProvider to provide methods and properties for constructing a spelling correction user interface.
- [TXSpellChecker.Suggestions Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/suggestions-property/llms.txt): Gets a collection of suggestions that were created by the last call of the TXSpellChecker.CreateSuggestions method. The property's value is an object of type SuggestionCollection.
- [TXSpellChecker.SynonymLanguage Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/synonymlanguage-property/llms.txt): Gets or sets the name of a synonym list that is located at the default synonym lists folder. When using the SynonymLanguage property, the SynonymList.IsSelectedAsDefault property of the selected synonym list is set to true. The default value is "(Auto)".
- [TXSpellChecker.SynonymLists Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/synonymlists-property/llms.txt): Gets a collection of all added synonym lists. The property's value is an object of type SynonymListCollection.
- [TXSpellChecker.SynonymListsDirectoryPath Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/synonymlistsdirectorypath-property/llms.txt): Gets or sets the path to the default synonym lists folder. The default value is "(Auto)" that determines the SynonymLists directory at the application's root folder or in the \Assembly\ subdirectory in the development machine's TX Spell .NET installation directory.
- [TXSpellChecker.UserDictionaryWordAdded Event](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/userdictionarywordadded-event/llms.txt): Occurs when a word is added to a user dictionary. The UserDictionaryWordAddedHandler receives an argument of type UserDictionaryWordAddedEventArgs containing data related to this event.
- [TXSpellChecker.UserDictionaryWordRemoved Event](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/userdictionarywordremoved-event/llms.txt): Occurs when a word is removed from a user dictionary. The UserDictionaryWordRemovedHandler receives an argument of type UserDictionaryWordRemovedEventArgs containing data related to this event.

---

## Nearby

- **Previous:** [TXSpell.SynonymListsDirectoryPath Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspell/synonymlistsdirectorypath-property/llms.txt)
- **Next:** [TXSpellChecker.AvailableDictionaries Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/availabledictionaries-property/llms.txt)
