Hyperlinks in an view-based TableView (NSTableCellView)

455 views Asked by At

I have an view-based TableView with an image and a NSTextField. I've got some links inside my NSTextField and I have tried many options (http://developer.apple.com/library/mac/#qa/qa2006/qa1487.html, dsclickableurltextfield) but nothing works out, because it seems that these options only fit to an cell-based tableview. I also watched the wwdc 2010 cocoa tips and tricks with an good explanation for links inside tableviews. But the custom NSTextFieldCell doesn't work for me. The mouse-events don't reach the custom class and for that reason nothings happens...

I hope you've got the right idea to solve this problem...

1

There are 1 answers

0
Pierre Bernard On

You need to add this to your table view's delegate:

- (BOOL)tableView:(NSTableView *)tableView shouldTrackCell:(NSCell *)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
{
    return YES; // required for specific tracking control in our NSTextFieldCell
}