Solved

Change underline colour in Rich Text Box

Posted on 2001-09-04
3
510 Views
Last Modified: 2008-03-03
Is there anyway to change underline colour in a RichTextBox, like Word does when the the AutoSpellcheck is on????
0
Comment
Question by:PeteD
3 Comments
 
LVL 1

Accepted Solution

by:
ScottNero earned 50 total points
ID: 6453992
Unfortunately, the Microsoft RichTextBox seems to ignore the \ulc directive. In Microsoft Word you can read RTF files which have directives such as:

\ul\ulc7 (shows up with yellow underline)
\ul\ulc5 (shows up with green underline)

However, when loading this same thing into the RichTextBox, the underlines all come out as black, leading me to the assumption that it does not support this functionality.
0
 
LVL 2

Expert Comment

by:JanusFury
ID: 6454919
I believe that's because the GDI font system doesn't allow for special-colored underlines. Word does this manually.
It's not too hard to draw a colored underline yourself, however I don't know how hard it would be to do so in a richtextbox (Probably would require a LOT of subclassing).
0
 
LVL 2

Author Comment

by:PeteD
ID: 6491144
gotta end this....... thanks anyway
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now