Re: Clickable textfields ...
Re: Clickable textfields ...
- Subject: Re: Clickable textfields ...
- From: Scott Anguish <email@hidden>
- Date: Tue, 30 Dec 2003 15:52:24 -0500
On Dec 30, 2003, at 2:24 PM, Chris Ridd wrote:
>
On 30/12/03 5:26 pm, J Nozzi <email@hidden> wrote:
>
>
> This has probably been covered before but I can't find it in the
>
> archives. I'm having a hard time figuring it out, though:
>
>
>
> I have a blue-colored NSTextField as a URL in the about box. I want
>
> it clickable so I can load the URL in the default browser (using
>
> NSWorkspace). I couldn't figure out how to do this directly with the
>
> NSTextField so I created a transparent button and laid it overtop the
>
> field but it doesn't fire unless I move it OFF the field. I also tried
>
> looking at NSTextFieldCell, but can't seem to grasp how I could make
>
> it
>
> work in this case either.
>
>
>
> Yes, I'm probably a total idiot ...
>
>
>
> Thanks, guys -n- gals.
>
>
Apple has some sample code which does this. There's also something at
>
cocoadev.
>
>
<http://developer.apple.com/samplecode/Sample_Code/Cocoa/TextLinks.htm>
>
this is major overkill for what is wanted here.
instead of using an NSTextField, it'd be easier to instead just use an
NSButton to also hold the text.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.