Third-Party Tools | Express Spell Checker

<< Click to display table of contents >>

Third-Party Tools | Express Spell Checker

ExpressSpellChecker is a VCL spell checker component.

Visit https://www.devexpress.com for additional information.

Installing

If DevExpress VCL components are installed, the TRichView installer instals the component integrating ExpressSpellChecker in TRichView and RichViewActions automatically.

Using

Create TRVADXSpellInterface component, assign it to SpellInterface property of TRVAControlPanel component.

Create TRvDxSpellChecker component, assign it to SpellChecker property of this TRVADXSpellInterface component. Add the code to initialize the spell checker.

Assign TrvActionSpellingCheck to a menu item or a toolbar button.

If you need an auto-correction feature, see the information in the topic for TRVACustomSpellInterface.

Live spelling check in TcxTRichViewEdit

In applications using DxSpellChecker, it is assumed that live spelling is performed only in the focused component.

If you use TcxTRichViewEdit component, it will be checked automatically when focused, if RvDxSpellChecker.CheckAsYouTypeOptions.Active = True.

You can assign TRVAPopupMenu component to RichViewEdit1.PopupMenu, however, TcxTRichViewEdit can display a popup menu with live spelling options even without it.

Live spelling check in TRichViewEdit (and TSRichViewEdit)

In applications using DxSpellChecker, it is assumed that live spelling is performed only in the focused component.

If you use TRichViewEdit component:

TRichViewEdit, process OnEnter and OnExit:

OnEnter: 
  RvDxSpellChecker1.CheckAsYouTypeOptions.Active := False; 
  RvDxSpellChecker1.UpdateRules; 
  RichViewEdit1.StartLiveSpelling; 
OnExit: 
  RichViewEdit1.ClearLiveSpellingResults; 
  RvDxSpellChecker1.CheckAsYouTypeOptions.Active := True;

Assign OnSpellingCheck event:

procedure TForm1.RichViewEdit1SpellingCheck(Sender: TCustomRichView;

  const AWord: String; StyleNo: Integer; var Misspelled: Boolean);

begin

  Misspelled := not RVADxSpellInterface1.IsWordValid(AWord,

    RichViewEdit1, StyleNo);

end;