Pregunta

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?

¿Fue útil?

Solución

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

Otros consejos

This (http://developer.apple.com/library/mac/#qa/qa1487/_index.html) may help you. It will show you how to set/change the blue link color and the underlineAttribute. You may also have a look at the methods -linkTextAttributes and -setLinkTextAttributes: of an NSTextView.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top