# Spell-Checking Commands

C1Editor for WinForms control implements spell-checking with SpellChecker property that allows you to connect it to a C1SpellChecker component.

## Content



The [C1Editor](/componentone/api/win/online-richtexteditor/dotnet-framework-api/C1.Win.C1Editor.4.8/C1.Win.C1Editor.C1Editor.html) implements spell-checking with a **SpellChecker** property that allows you to connect it to a **C1SpellChecker** component.

The **C1SpellChecker** is a separate, stand-alone component that can be used to spell-check many types of controls including **TextBox**, **RichTextBox**, **WebBrowser**, and of course the C1Editor. The **C1SpellChecker** includes spelling dictionaries for over 20 languages, and it includes a dictionary editor that allows you to create your own custom dictionaries.

The C1Editor supports as-you-type spell checking (with red wavy lines under misspelled words and suggestions in context menus) as well as a dialog-based spell checking that highlights each misspelled word and allows the user to correct each one from the spell dialog.

The **ToolStripMain** class exposes as-you-type spell-checking as follows:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
void ShowSpellingErrors_Click(object sender, EventArgs e)
{
    if (SpellChecker != null)
    {
        bool show = !_btnShowErrors.Checked;
        _btnShowErrors.Checked = show;
        SpellChecker.SetActiveSpellChecking(
            Editor, 
            Editor.GetActiveXInstance(), 
            show);
    }
}
```

DOC-DETAILS-TAG-CLOSE

The core of the method is a call to the **C1SpellChecker**'s **SetActiveSpellChecking** method, which turns the as-you-type spell checking on or off for the specified control.

The **ToolStripMain** class exposes modal spell-checking as follows:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
void Spell_Click(object sender, EventArgs e)
{
    if (SpellChecker != null)
    {
        SpellChecker.CheckControl(
            Editor, 
            Editor.GetActiveXInstance());
    }
}
```

DOC-DETAILS-TAG-CLOSE

The core of the method is a call to the **C1SpellChecker**'s **CheckControl** method, which performs the dialog-based spell-checking for the specified control.