Skip to content

DevExpress-Examples/winforms-spreadsheet-spell-check-cell-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spreadsheet for WinForms – Spell Check Text in a Cell Editor

This example demonstrates how to use the DevExpress Spell Checker component to check spelling in spreadsheet cells. When a user types text in a cell, the spell checker indicates misspelled words with a red wavy line. The user can right-click an underlined word and select the correct spelling from the list of suggestions or invoke the Spelling dialog.

Spreadsheet - Spell Checking

This example uses the default English dictionary to check cell text. Refer to the following help topic for information on how to add dictionaries for other languages to the Spell Checker: Spell Checker Dictionaries.

Implementation Details

Follow the steps below to integrate a spell checker into the Spreadsheet application:

  1. Register the control used as the default cell editor (the System.Windows.Forms.TextBox descendant) to enable spell check in spreadsheet cells. See this topic for details: Check Spelling in Different Controls.

    SpellCheckTextControllersManager.Default.RegisterClass(typeof(TextBoxWithTransparency),
        typeof(SimpleTextBoxTextController));
    SpellCheckTextBoxBaseFinderManager.Default.RegisterClass(typeof(TextBoxWithTransparency),
        typeof(TextBoxFinder));
    
  2. Handle the SpreadsheetControl.CellEditorOpened event to access the active cell editor. Use the SpellChecker.Check method to check text in the editor.

  3. Create and display a Spell Check context menu for the cell editor, as described in this help topic: Add a Spell Check Menu to the Standard Text Controls.

Files to Look At

More Examples

Does This Example Address Your Development Requirements/Objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Use the Spell Checker component to check spelling in spreadsheet cells.

Topics

Resources

License

Stars

Watchers

Forks

Contributors