Products Technologies Demo Docs Blog Support Company

Implementing a Speedy AutoText Using the SpellCheckText Event

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…

Implementing a Speedy AutoText Using the SpellCheckText Event

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 from our GitHub repository.

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

GitHub

Download and Fork This Sample on GitHub

We proudly host our sample code on github.com/TextControl.

Please fork and contribute.

Download ZIP

Open on GitHub

Open in Visual Studio

Requirements for this sample

  • Visual Studio 2017 or better
  • TX Text Control .NET for Windows Forms (trial sufficient)

Related Posts

Windows FormsWPF.NET

Create a Table of Contents in Windows Forms using C#

This article explains how to create a table of contents in Windows Forms using the ribbon or programmatically. Creating a table of contents is required to organize large documents.


ASP.NETWindows FormsWPF

Official TX Text Control .NET Sample Applications Are Now Hosted on GitHub

This article gives a quick overview of the new repositories, their structure and our plans for the future.


ASP.NETJavaScriptDocument Editor

Detect Toggle Button Changes Using a MutationObserver

This article shows how to detect changes of toggle buttons in the ribbon of the web editor using a MutationObserver. The state of a toggle button in the ribbon visualizes the state of a certain…


Windows FormsList.NET

Two Ways to Restart Numbered Lists in TX Text Control

In TX Text Control, numbered lists are continued by default and need to be reset when required. There is more than one way if you want to restart numbered lists in a document. In this article, two…


Windows FormsSampleShortcuts

Zoom Tricks: Disabling CTRL + MOUSE WHEEL and More

This article shows how to disable CTRL + MOUSE WHEEL, implement zooming with keyboard and reset the zoom factor to its default value.