# TextControl.SpellCheckText Event

> Occurs, if the document's text has been altered and the spelling of the new text must be checked. This event occurs only, if the SpellChecker property has been set to null and if the IsSpellCheckingEnabled property has been set to true. If a spell checking component has been connected with the TextControl, this event is handled internally. The event handler receives an argument of type SpellCheckTextEventArgs containing data related to this event.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Event
- **Introduced:** 16.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Windows.Forms.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > TextControl.SpellCheckText Event
- **409 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/spellchecktext-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/spellchecktext-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/spellchecktext-event/llms-full.txt

---

### Description

Occurs, if the document's text has been altered and the spelling of the new text must be checked. This event occurs only, if the [SpellChecker](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/spellchecker-property/llms-full.txt) property has been set to null and if the [IsSpellCheckingEnabled](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/isspellcheckingenabled-property/llms-full.txt) property has been set to true. If a spell checking component has been connected with the TextControl, this event is handled internally. The event handler receives an argument of type [SpellCheckTextEventArgs](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/spellchecktexteventargs/llms-full.txt) containing data related to this event.

### Syntax

```csharp
public event SpellCheckTextEventHandler SpellCheckText;
```

```vbnet
Public Event SpellCheckText As SpellCheckTextEventHandler
```

### Examples

The following example records useful context when spell check text occurs.

```csharp
textControl.SpellCheckText += (sender, e) =>
{
    Console.WriteLine($"Text: {e.Text}");
};
```

```vbnet
AddHandler textControl.SpellCheckText,
    Sub(sender, e)
        Console.WriteLine($"Text: {e.Text}")
    End Sub
```

---

## Nearby

- **Previous:** [TextControl.SpellChecker Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/spellchecker-property/llms-full.txt)
- **Next:** [TextControl.StatusBar Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/statusbar-property/llms-full.txt)
