'Declaration Public Event ShowSuggestions As SuggestionsEventHandler
public event SuggestionsEventHandler ShowSuggestions
Event Data
The event handler receives an argument of type SuggestionsEventArgs containing data related to this event. The following SuggestionsEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Suggestions | Gets the suggestion list. |
Word | Gets the misspelled word. |
Remarks
Use this method to customize the suggestion list. Suggestions can be added, removed or rearranged.
If the suggestion list contains more items than SpellOptions.MaxSuggestionsInContextMenu, then the additional items won't be shown in the spell context menu.
This event does not occur when user calls GetSuggestions(String,Int32) method.
Example
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"); }
See Also