Page 1 of 1

Getting RVAddictSpell3 live autocorrect to work

Posted: Fri Mar 27, 2015 5:11 pm
by johnF
Hi,

In "actiontestaddict" demo, I can set "jimr" to autocorrect to "JimR" as I type.

However I am struggling to get that to happen in my own project.

I don't see any attach option for this post, but if you can let me know what needs changed after adding a TRichViewEdit and TRVAddictSpell3 to a new form that should be enough.

I know how to add Auto-Corrections to Custom Dictionary after clicking Options in spell check dialog.

Thanks, Jim.

Posted: Sat Mar 28, 2015 12:37 pm
by Sergey Tkachenko
See the commented code in the main unit of ActionTest projects.

Code: Select all

procedure TForm3.RichViewEdit1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  {
  // uncomment if you use Addict3
  if Key = VK_RETURN then
    RVA_Addict3AutoCorrect(RichViewEdit1);
  }
  ...
end;

procedure TForm3.RichViewEdit1KeyPress(Sender: TObject; var Key: Char);
begin
  {
  // uncomment if you use Addict3
  if (Key in ['''', #13, #9]) or (Pos(Key, RichViewEdit1.Delimiters)<>0) then
    RVA_Addict3AutoCorrect(RichViewEdit1);
  }
  ...
end;