TCustomRichView.OnSpellingCheck

<< Click to display table of contents >>

TCustomRichView.OnSpellingCheck

Allows to mark misspelled words.

type

  TRVSpellingCheckEvent = procedure (Sender: TCustomRichView;

    const AWord: TRVUnicodeString; StyleNo: Integer;

    var Misspelled: Boolean) of object;

 

property OnSpellingCheck: TRVSpellingCheckEvent;

(introduced in v1.9; changed in version 18)

This event is called for each word in the document.

Input parameters:

AWord is a word to check

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

Output parameter:

Misspelled, must be set to True if this word is misspelled.

 

Example (using Addict3 spelling checker):

procedure TMyForm.MyRichViewEditSpellingCheck(Sender: TCustomRichView;

  const AWord: TRVUnicodeString; StyleNo: Integer;

  var Misspelled: Boolean);

begin

  Misspelled := not MyRVAddictSpell3.WordAcceptable(AWord);

end;

This event is called in thread context.

 

FireMonkey note:

If the current platform provides a spelling checking service, TRichViewEdit can use it (see CheckSpelling property). In this case, checking does not require this event (however, if this event is assigned, it has a higher priority than a platform service).

 

See also:

Live spelling check in TRichView.

OnGetSpellingSuggestions [FMX]