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

查看:224
本文介绍了更改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中任意文本的链接

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天全站免登陆