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?
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?
Neither NSCell
nor NSTableColumn
will display tool tips, because neither is a subclass of NSView
. You will have to set the tool tip on the table view itself.
You can use -[NSView addToolTipRect:owner:userData:]
to set a tool tip for a particular area of a view. In combination with -[NSTableView frameOfCellAtColumn:row:]
, you ought to be able to set up a different one for each cell.
I solved this by overriding this method in the controller for my NSOutlineView: