TCustomRichView.OnGetSpellingSuggestions [FMX]

<< Click to display table of contents >>

TCustomRichView.OnGetSpellingSuggestions [FMX]

This event requests a list of suggestions for the misspelled word.

type
  TRVGetSpellingSuggestionsEvent = procedure(
    Sender: TCustomRichView;
    const AWord: TRVUnicodeString; StyleNo: Integer;
    out ASuggestions: TArray<String>) of object;
 
property OnGetSpellingSuggestions: TRVGetSpellingSuggestionsEvent;

(introduced in v21)

This event is used when the component wants to display a popup menu and to populate it with items that offer corrections for the misspelled word.

In the current version, this event is not used in TRichView, only in TRichViewEdit.

If a platform spelling check service is used (see CheckSpelling property), this event is not necessary: suggestions are received from a platform service. However, if this event is assigned, it is used instead of a platform service.

 

If PopupMenu property is not assigned, items are added to the built-in default popup menu.

If PopupMenu property is assigned, you can use AddSpellingMenuItems to add items in any popup menu.

 

Input parameters:

AWord is a word to correct.

StyleNo is a style of text item containing this word (index in the collection Sender.Style.TextStyles).

Output parameter:

ASuggestions, a list of suggestions to replace AWord in the document.

 

See also:

Live spelling check in TRichView;

OnSpellingCheck event