Search code examples
objective-ccocoanstableviewnsoutlineviewnsimagecell

NSImageCell: Set ToolTip


I'm trying to show a tooltip on the mouse hover at a NSImageCell. I've tried setting the property on Interface Builder (both on the NSImageCell and the NSTableColumn that contains it) but it didn't work.

Any ideas?


Solution

  • I solved this by overriding this method in the controller for my NSOutlineView:

    - (NSString *)outlineView:(NSOutlineView *)outlineView toolTipForCell:(NSCell *)cell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)tableColumn item:(id)item mouseLocation:(NSPoint)mouseLocation;