Page 1 of 1
Spelling Exception?
Posted: Fri Sep 10, 2021 10:09 am
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
Re: Spelling Exception?
Posted: Fri Sep 10, 2021 12:25 pm
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.
Re: Spelling Exception?
Posted: Fri Sep 10, 2021 1:47 pm
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 (64.89 KiB) Viewed 6369 times
Stan