Solved

Change underline colour in Rich Text Box

Posted on 2001-09-04
3
532 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

729 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