Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

fbs419

macrumors newbie
Original poster
Sep 9, 2012
8
0
I'm new to Cocoa/Interface builder, and all I'm trying to do is have some hyperlinked text on the bottom of a panel. There doesn't seem to be a hyperlink control in the object library. What is the best way to do this?

A button linked to an action (if so, how do you make button look like a link)?
A text field with some sort of attributes?
Another view of some sort?
Another possibility?

It's probably something simple, but I just haven't found a definitive answer. My app needs to be backward compatible to 10.5 (maybe 10.6)

Thanks
 
If you just want some text in the window frame area to effect an action, you can create a borderless button that looks like ordinary text.

In one app, I wrote the help files in Text Edit as RTF files in which I included hyperlinks that I was able to respond to through a delegate to the text view, if that is more like what you want to do.
 
Thanks chown33

http://developer.apple.com/library/mac/#qa/qa1487/_index.html works. That was exactly what I needed -- clicking the text goes to a web site. I do notice that after I click the text, the font changes (gets smaller). Other than that, this is working great.

Thanks again

Typically when a link is clicked, the font should change somehow so the user can see which links have been clicked and which ones happened. I'd look if there are options to turn this off, or to set a font for clicked links.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.