Blogs

Windows Forms

XtraSpellChecker: Check Spelling as You Type

     

Did you know that the XtraSpellChecker Suite can check spelling as you type? Just like in MS Word or Outlook.

Enabling this feature is a breeze, just set one property and call one method:

Set the SpellCheckMode property to AsYouType:

spellChecker1.SpellCheckMode = SpellCheckMode.AsYouType;

Then call the SpellChecker.Check method, and you're set:

spellChecker1.Check(memoEdit1);

After enabling the "check as you type" feature, red curves are displayed under misspelled words. Words are underlined to show that the spell checker doesn't recognize them.

Check spelling as you type

 

The appearance of the red curves are fully customizable. If you prefer Blue then set the SpellChecker.CheckAsYouTypeOptions.Color property:

Set the CheckAsYouTypeOptions property

To correct a misspelled word just right-click on the misspelled word and you'll get a list of suggested words from the dictionary:

Blue lines

Parts [1] and [2] of this series showed the XtraSpellChecker's other capabilities. In a future post, you'll see how different dictionaries can be used to make XtraSpellChecker conform to your needs.

Are you curious about other XtraSpellChecker features?

Which features are your favorites?

Please leave a comment below and let me know. Thanks!

Published Sep 24 2007, 08:35 AM by Alan (DevExpress)
Filed under:
Technorati tags: XtraSpellChecker
Bookmark and Share

Comments

 

Jason Bott said:

Hello,

I was told that as-you-type spell checking only works for one control at a time on a given form.  Could you confirm whether this is true?

Thanks!

September 25, 2007 12:16 PM
 

Mehul Harry (DevExpress) said:

Hi Jason,

You can check multiple controls by using multiple XtraSpellChecker components. Also, the SharedDictionaryStorage component might be useful for you. It's required if you need to use several XtraSpellChecker components with different settings but with the same dictionary storage in one application.

Thanks.

September 25, 2007 5:51 PM
 

AshleyT said:

Where should this code go?  In the Load Event of the form?

September 28, 2007 10:52 AM
 

Alan (DevExpress) said:

Hello Ashley,

It depends upon your particular scenario, but of course, you can add this code to a form's Load event.

For example, please see the following application, which demonstrates how this can be done: community.devexpress.com/.../MultipleCheckAsYouType.zip

October 1, 2007 9:12 AM

About Alan (DevExpress)

Joined Developer Express on August 22, 2003
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.