Autotext Functionality

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
Camphausen
Posts: 7
Joined: Tue Oct 25, 2005 12:00 am

Autotext Functionality

Post by Camphausen »

I would like to add Autotext functionality. Every time I press a key the editor will read the current word (no matter whether in a table or normal text area) and look it up in a database. When I press F6 (or similar) the text found in the database will replace my current word in the editor.
I hope my description is easy to understand.
Thanks for your help.
Christoph
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

You can call GetCurrentWord from RVGetTextW unit (or from RVGetText unit, if you use non-Unicode version of Delphi and non-Unicode documents).
Then, to replace a word, call SelectCurrentWord and InsertText.

(all these methods must be called for SRichViewEdit.ActiveEditor).

An example can be found in Demos\RVDemos\Assorted\AutoComplete\
Post Reply