Re: Links in NSTextField
Re: Links in NSTextField
- Subject: Re: Links in NSTextField
- From: PGM <email@hidden>
- Date: Thu, 24 Aug 2006 21:19:45 -0400
I remember that when I tried it (about a year ago so I do not
remember all specifics), it only worked when the textField was
editable, which would be a bit of a nuisance for the user. I tried
several other approaches, but in the end I just made a normal
NSTextField with blue underlined text and overlayed a transparent
button with an action that used NSWorkspace to load the URL.
Unfortunately that does not give the nice handcursor.
Patrick
On 24-Aug-06, at 16:18 PM, Uli Kusterer wrote:
Am 24.08.2006 um 16:47 schrieb Michael Nickerson:
It works with an NSTextField. Set its attributed string value.
You then just need to set it to be selectable (you can keep it non-
editable), otherwise it doesn't respond to clicks.
I actually tried that first, but not only didn't it trigger the
link, it lost the link style as soon as I clicked it. :-(
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40sympatico.ca
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden