Third-Party Tools | ASpell

<< Click to display table of contents >>

Third-Party Tools | ASpell

GNU Aspell is a Free and Open Source spell checker.

Addict 3 and 4 is a spelling check and thesaurus component suite. Visit aspell.net for additional information.

Installing

ASpell support does not require additional components, all necessary components are installed by the TRichView installer.

However, the components works only if ASpell is installed. The installer can be found on aspell.net/win32.

Using

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

Create TRVASpell component, assign it to ASpell property of this TRVAASpellInterface component.

Assign TrvActionSpellingCheck to a menu item or a toolbar button.

Live spelling check

To enable a live spelling check, assign OnSpellingCheck event of TCustomRichViewEdit component:

procedure TForm1.RichViewEdit1SpellingCheck(Sender: TCustomRichView;

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

begin

  Misspelled := not RVAASpellInterface1.IsWordValid(AWord,

    RichViewEdit1, StyleNo);

end;

If you want to start a live spelling check when the user starts editing, assign rvlspOnChange to LiveSpellingMode property of TCustomRichViewEdit component.

If you want to start a live spelling check when the user loaded a document, use OnOpenFile event of TrvActionOpen action:

procedure TForm1.RvActionOpen1OpenFile(Sender: TObject;

  Editor: TCustomRichViewEdit; const FileName: String;

  FileFormat: TrvFileOpenFilter; CustomFilterIndex: Integer);

begin

  Editor.StartLiveSpelling;

end;

Assign TRVAPopupMenu component to RichViewEdit1.PopupMenu.