Spelling Exception?

General TRichView support forum. Please post your questions here
Post Reply
standay
Posts: 274
Joined: Fri Jun 18, 2021 3:07 pm

Spelling Exception?

Post by standay »

Sergey,

Is there a way to skip spell checking an item? Normally I want to check everything, but if I insert a snippet of code I'd like to be able to flag or mark that so the spell check will not show anything in it as misspelled.

Thanks Sergey

Stan
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Spelling Exception?

Post by Sergey Tkachenko »

In the current version, all text items that have Charset <> SYMBOL_CHARSET are checked.
I'll implement spelling exceptions in one of future versions.
standay
Posts: 274
Joined: Fri Jun 18, 2021 3:07 pm

Re: Spelling Exception?

Post by standay »

Hi Sergey,

I was able to get it to work doing these things. Where I set the text styles I do:

Code: Select all

    FontInfo := TFontInfo.Create(nil);
  for i := DItem1 to DItem2 do
  begin
    FontInfo.Assign(RVStyle1.TextStyles[ rve.GetItemStyle(i) ]);
    FontInfo.StyleName := 'nospell';
        NewStyleNo := RVStyle1.TextStyles.Count;
        RVStyle1.TextStyles.Add;
        RVStyle1.TextStyles[NewStyleNo].Assign(FontInfo);
        RVStyle1.TextStyles[NewStyleNo].Standard := False;
    rve.GetItem(i).StyleNo := NewStyleNo;
  end;
    FontInfo.Free;
And in SpellingCheck I used:

Code: Select all

  if Spelling1.Checked and (RVStyle1.TextStyles[StyleNo].StyleName <> 'nospell') then
Spelling1 is a menu item I can set to turn spell check completely on or off.

I tried using basestyleno as the flag first (screen shot below) but that does not see to be saved when I save the file.

I may or may not keep this in my app for now. I'd be more comfortable with a solution you come up with in the future.

Image69.jpg
Image69.jpg (64.89 KiB) Viewed 6365 times
Stan
Post Reply