[]
Occurs when suggestions is about to show in the spell dialog or in the spell context menu.
public event SuggestionsEventHandler ShowSuggestions
Type | Description |
---|---|
SuggestionsEventHandler | Occurs when suggestions is about to show in the spell dialog or in the spell context menu. |
Use this method to customize the suggestion list. Suggestions can be added, removed or rearranged.
If the suggestion list contains more items than MaxSuggestionsInContextMenu, then the additional items won't be shown in the spell context menu.
This event does not occur when user calls GetSuggestions(string, int) method.
This example checks the misspelled word and inserts one or more suggestions at the top of the list if need.
private void c1SpellChecker1_ShowSuggestions(object sender, C1.Win.C1SpellChecker.SuggestionsEventArgs e)
{
if (e.Word.StartsWith("o"))
e.Suggestions.Insert(0, "one new suggestion");
if (e.Word.Contains("i"))
e.Suggestions.Insert(0, "is suggestion");
if (e.Word.StartsWith("tex"))
e.Suggestions.Insert(0, "text suggestion");
}