NSTextField单击的链接颜色 [英] NSTextField clicked link colour
本文介绍了NSTextField单击的链接颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个NSTextField
,其中包含一个NSAttributedString
本身包含一个可点击的链接.
I have an NSTextField
that contains an NSAttributedString
which itself contains a clickable link.
我已经为自己的样式更改了链接的颜色,但是当我单击它时,它变为蓝色并带有下划线.我该如何阻止呢?
I've change the colour of the link for my own styling, however when I click on it it becomes blue and underlined. How can I stop this?
推荐答案
似乎我不是唯一遇到此问题的人,并且有一个方便的类可以解决此问题:
Seems that I'm not the only one with this problem, and there's a handy class to solve it:
https://github.com/laevandus/NSTextFieldHyperlinks
这篇关于NSTextField单击的链接颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文