Skip to main content

How to: Obtain a List of Commands for the Misspelled Word

The code below shows how to obtain the list of spellCheck commands for the clicked misspelled word.

Use the SpellCheckerCommand.DoCommand method to execute this command.

using DevExpress.XtraSpellChecker;
using DevExpress.XtraSpellChecker.Rules;
// ...
Point position = e.Control.PointToClient(e.Position);
SpellCheckErrorBase error = spellChecker1.CalcError(position);
List<SpellCheckerCommand> commands = spellChecker1.GetCommandsByError(error);
See Also