hello, I got the addict component to work with SRichViewEdit but I did not find any demo, could you show an example?
I have configured the dictionary through: AddictSpell.Setup;
and execute this in the OnCreate of my form: AddictSpell.AddControl (SRichViewEdit1);
SRichViewEdit + addict software
Re: SRichViewEdit + addict software
The location where you did the installation + \TRichView\ThirdParty\Addict
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: SRichViewEdit + addict software
Yes, the demo is there, in <TRichView dir>\ThirdParty\Addict\Demos\RichViewActions\
(there is also a demo without RichViewActions, but I assume you use RichViewActions for building user interface for ScaleRichView).
Instructions:
- I assume you already have RVAControlPanel1: TRVAControlPanel;
- place RVAddictSpell31: TRVAddictSpell3 on the form;
- place RVAAddictSpellInterface1: TRVAAddictSpellInterface on the form;
- assign RVAControlPanel1.SpellInterface = RVAAddictSpellInterface1
- assign RVAAddictSpellInterface1.AddictSpell = RVAddictSpell31
- assign RVAControlPanel1.SpellInterface = RVAAddictSpellInterface1
Now you can use TrvActionSpellingCheck to show the spelling dialog, and all live spelling commands are added to TRVAPopupMenu when you right click a misspelled word.
But one more step is needed: to start live spelling (spelling checking as-you-type).
To do it, assign TSRichViewEdit.OnSpellingCheck event:
If you use a multi-document UI, like in ActionTestTabs demo, assign this event when copying properties to new editors
(in TForm3.AddEditor, add the line
srve.OnSpellingCheck := SRichViewEdit1SpellingCheck;
)
PS: thesaurus is implemented by
- placing RVThesaurus31: TRVThesaurus3 on the form
- assigning RVAAddictSpellInterface1.Thesaurus = RVThesaurus31
- using TrvActionThesaurus action
PPS: TRichView image lists provided for RichViewActions include glyphs for spelling check and for thesaurus.
(there is also a demo without RichViewActions, but I assume you use RichViewActions for building user interface for ScaleRichView).
Instructions:
- I assume you already have RVAControlPanel1: TRVAControlPanel;
- place RVAddictSpell31: TRVAddictSpell3 on the form;
- place RVAAddictSpellInterface1: TRVAAddictSpellInterface on the form;
- assign RVAControlPanel1.SpellInterface = RVAAddictSpellInterface1
- assign RVAAddictSpellInterface1.AddictSpell = RVAddictSpell31
- assign RVAControlPanel1.SpellInterface = RVAAddictSpellInterface1
Now you can use TrvActionSpellingCheck to show the spelling dialog, and all live spelling commands are added to TRVAPopupMenu when you right click a misspelled word.
But one more step is needed: to start live spelling (spelling checking as-you-type).
To do it, assign TSRichViewEdit.OnSpellingCheck event:
Code: Select all
procedure TForm3.SRichViewEdit1SpellingCheck(Sender: TCustomRichView;
const AWord: TRVUnicodeString; StyleNo: Integer; var Misspelled: Boolean);
begin
Misspelled := not RVAddictSpell31.WordAcceptable(AWord);
end;
(in TForm3.AddEditor, add the line
srve.OnSpellingCheck := SRichViewEdit1SpellingCheck;
)
PS: thesaurus is implemented by
- placing RVThesaurus31: TRVThesaurus3 on the form
- assigning RVAAddictSpellInterface1.Thesaurus = RVThesaurus31
- using TrvActionThesaurus action
PPS: TRichView image lists provided for RichViewActions include glyphs for spelling check and for thesaurus.
Re: SRichViewEdit + addict software
Thanks for the answer. I'm using addict version 4.0
and I did not find the "RVAAddictSpellInterface1"
and I did not find the "RVAAddictSpellInterface1"
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: SRichViewEdit + addict software
TRVAddictSpell31 and TRVAAddictSpellInterface components are registered by TRichView installer if it can find (and if it can use) Addict4.
But unfortunately, there is a problem:
- all our packages are "never-build" packages;
- the Addict packages are "always-build" packages
"Never-build" packages cannot use "always-build" packages.
To use Addict with TRichView, you have to make Addict packages "never-build" and recompile them.
To do it, open the Addict package (for example, for Delphi 10 Berlin, the package is <Addict Dir>\Source\d24\addict4_d24.dpk). Right click the package name in the Project Manager (usually located at the right side of the screen), choose "Options..." in the menu. Go to the page "Description". Change "Build control" = "Explicit rebuild". "OK". Re-install the package (right click the package name, "Install").
Make sure that you do not have old version of the package compilation results (<package name>.bpl and <package name>.dcp) files. If you have several copies BPL and DCP files of Addict packages, delete the old versions.
Then re-install TRichView in Delphi. To do it, you can use "Install TRichView in Delphi IDE" shortcut in the Windows Start Menu. If everything is correct, the installer will write "Installed" instead of "Skipped" next to "Addict 4 parser" item, and you will be able to use TRVAddictSpell31 and TRVAAddictSpellInterface components.
But unfortunately, there is a problem:
- all our packages are "never-build" packages;
- the Addict packages are "always-build" packages
"Never-build" packages cannot use "always-build" packages.
To use Addict with TRichView, you have to make Addict packages "never-build" and recompile them.
To do it, open the Addict package (for example, for Delphi 10 Berlin, the package is <Addict Dir>\Source\d24\addict4_d24.dpk). Right click the package name in the Project Manager (usually located at the right side of the screen), choose "Options..." in the menu. Go to the page "Description". Change "Build control" = "Explicit rebuild". "OK". Re-install the package (right click the package name, "Install").
Make sure that you do not have old version of the package compilation results (<package name>.bpl and <package name>.dcp) files. If you have several copies BPL and DCP files of Addict packages, delete the old versions.
Then re-install TRichView in Delphi. To do it, you can use "Install TRichView in Delphi IDE" shortcut in the Windows Start Menu. If everything is correct, the installer will write "Installed" instead of "Skipped" next to "Addict 4 parser" item, and you will be able to use TRVAddictSpell31 and TRVAAddictSpellInterface components.