Third-Party Tools | Polar Spell Checker ActiveX

<< Click to display table of contents >>

Third-Party Tools | Polar Spell Checker ActiveX

Polar SpellChecker component is a spell checker. It may be used as DLL or as ActiveX. TRichView uses it as ActiveX.

Last time Polar SpellChecker was updated in 2005.

Visit http://www.polarsoftware.com/ for additional information.

Installing

1.Install the Polar SpellChecker Components.

2.Import it in Delphi. Menu "Component | Import Component" (or "Component | Import ActiveX Control", depending on your Delphi version) import and install "Polar SpellChecker 5.0 Component", The component must be installed in the package PolarSpellCheckerPkg*, where * depends on Delphi version:

Delphi 5..7: D5..D7

Delphi 2005..2010: D2005..D2010

Delphi XE..XE8: DXE..DXE8

Delphi 10 Seattle: D10

Delphi 10.1 Berlin..10.3 Rio: D10_1..D10_3

3.TRichView includes packages for installing support for Polar SpellChecker (in ThirdParty\Polar\ folder), but the installer does not install them automatically. Open the package RVPolarPkg* and compile. Open the package RVPolarPkg*_Dsgn and install.

Using

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

Create TRVPolarSpellChecker component, assign it to PolarSpellChecker property of this TRVAPolarSpellInterface component.

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

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 RVAPolarSpellInterface1.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.