Search code examples
c#.net.net-2.0

How to add to a textbox the red line (like bad spelling in Word)?


How can we produce the effect of the red line under a bad spelling word like the image below :

alt text http://img505.imageshack.us/img505/7253/options285x395rg9.th.png

Update

I do not want to use Google or whatever spell program. I would like to know how to create the effect of the red line.


Solution

  • You can do this using a RichTextBox control, which will allow you to set the underline style and underline color on any portion of text.

    And here's an example doing exactly what you want to do.