We just published a sample project that shows how to implement a very fast and reliable AutoText functionality.

Especially when typing a lot of letters, e-mails or any other text, repeating the same, long or complex words can be annoying. Modern word processors offer a functionality called AutoText that replaces pre-defined shortcuts with the actual string.

Since version 16.0 of TX Text Control, the SpellCheckText event is available. This event occurs, if the document's text has been altered. Generally, it is used to pass the changed text to a spell checking engine. In this sample, the event is used to check for the pre-defined shortcuts. If a typed word is a shortcut, it will be added to the MisspelledWordCollection.

The advantage of using the SpellCheckText event is that the words must not be selected using the Selection object which might cause a flicker. The words are replaced directly using TX Text Control's MisspelledWordCollection which results in a very reliable and fast replacement. It is not necessary to trap any keystrokes in order to check which characters have been typed.

Download the sample in our source code library:

How to implement a speedy AutoText using the SpellCheckText event