Solved

Change underline colour in Rich Text Box

Posted on 2001-09-04
3
530 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

737 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