views:

58

answers:

1

Hi,

I'm using custom NSCell in NSTableView similar to:

http://www.martinkahr.com/2007/05/04/nscell-image-and-text-sample/

I wish to display text with many clickable URL.

can any body throw me in tight direction?

I was trying to do something like:

http://snippets.aktagon.com/snippets/358-How-to-make-a-clickable-link-inside-a-NSTextField-and-Cocoa

but it change NSCell in link, I wish to change only some parts of text into links.

thanks for any help

+2  A: 

The line that reads

NSRange range = NSMakeRange(0, [attrString length]);

is picking the part of the text that will be changed into a link. This code makes it the whole string. To make it a subset of the string, just set the range appropriately.

cdespinosa