Groups | Blog | Home
all groups > dotnet general > january 2008 >

dotnet general : RichTextBox - color of visited hyperlinks



Roger
1/6/2008 10:23:01 AM
In my app I would like to change the color of the hyperlink from blue to
purple when a user clicks the hyperlink in a RichTextBox.
The DetectUrls property is set to True and I handle the
RichTextBox1.LinkClicked event to launch a browser window. That works fine.

The problem is that once the DetectUrls property is True the RichTextBox
control shows the link in blue even if I select the text and change the
SelectionColor to purple.
For example, I can change the font style of a visited link to say bold or
italic but I cannot change the color of a visited link.
I can change the hyperlink color to purple if DetectUrls is False but then I
cannot visit any other links in the RichTextBox text.

Has anyone else experienced this problem?
Is there an answer??

Thanks in advance

Roger
VS2005 , vb.net
--
Cor Ligthert[MVP]
1/6/2008 7:37:20 PM
Roger,

Will you try to avoid multiposting, it is without sense to answer these
questions because you never know has given a better answer before you. So
the answers will always short or like this one.

Cor
AddThis Social Bookmark Button