|
TCustomRichView.OnSpellingCheck |
Top Previous Next |
|
Allows to mark misspelled words. type TRVSpellingCheckEvent = procedure (Sender: TCustomRichView; const AWord: String; StyleNo: Integer; var Misspelled: Boolean) of object;
property OnSpellingCheck: TRVSpellingCheckEvent; (introduced in v1.9) This event is called for each word in the document. Input parameters: AWord is a word to check (Unicode for Delphi/C++Builder 2009 or newer, ANSI for older versions of Delphi/C++Builder). 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: String; StyleNo: Integer; var Misspelled: Boolean); begin Misspelled := not MyRVAddictSpell3.WordAcceptable(AWord); end; This event is called in thread context.
See also: |