Skip navigation.
 
mlRe: NSTableView tooltips
FROM : Quincey Morris
DATE : Thu Feb 21 20:57:49 2008

On Feb 20, 2008, at 16:19, Graham wrote:

> Not sure if this is the only way, but you can implement the delegate 
> method:
>
> - (NSString *)tableView:(NSTableView *)aTableView toolTipForCell:
> (NSCell *)aCell rect:(NSRectPointer)rect tableColumn:(NSTableColumn 
> *)aTableColumn row:(int)row mouseLocation:(NSPoint)mouseLocation
>


I decided not to go this route, since it would result in a different 
tooltip for every cell. But your suggestion sent me to the 
documentation and I found out why I didn't get the results I expected.

It turns out that IB is Working As Intended, in that the tooltip you 
set for a column is really a tooltip for just the column header. But 
the IB interface is incredibly confusing in its representation of the 
geometry that the tooltip applies to (and for the table header subview 
too).

In the end, I just subclassed NSTableColumn to make it do what IB 
*looked* like it was doing.

Now I'm off to radar the multiple bugs in the tooltip text field in 
IB's inspector ...

Related mailsAuthorDate
mlNSTableView tooltips Quincey Morris Feb 21, 01:04
mlRe: NSTableView tooltips Graham Feb 21, 01:19
mlRe: NSTableView tooltips Quincey Morris Feb 21, 20:57