在RichTextBox中更改链接颜色 [英] Change link color in RichTextBox

查看:180
本文介绍了在RichTextBox中更改链接颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含张贴的用户连接一个RichTextBox。

I have a RichTextBox which contains links posted by the users.

的问题是,我的RTB使得链接的颜色黑色,背景色也黑色。这导致的链接是不可见的。

The problem is that my RTB makes the color of the links black, and the background color is also black. This leads to the links being invisible.

我如何更改RTB的链接的颜色?

How do I change the color of the links in the RTB?

推荐答案

Phoexo:

看一看下面的CodeProject上的文章。这家伙提供了一种方法来创建在工作文本链接随心所欲,而DetectUrls属性设置为false 的。随着黑客少量的,你应该有你的链接的格式的完全控制。

Have a look at the following CodeProject article. This fellow provides a way to create arbitrary links in the text that work, while the DetectUrls property is set to false. With a small amount of hacking, you should have full control of the formatting of your links.

在一个RichTextBox结果
<一个任意文本链接HREF =http://www.codeproject.com/KB/edit/RichTextBoxLinks.aspx?display=Print相对=nofollow> http://www.codeproject.com/KB/edit/RichTextBoxLinks.aspx?display =打印

Links with arbitrary text in a RichTextBox
http://www.codeproject.com/KB/edit/RichTextBoxLinks.aspx?display=Print

这篇关于在RichTextBox中更改链接颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆