tableView(_:toolTipFor:rect:tableColumn:row:mouseLocation:)
Asks the delegate for a string to display in a tooltip for the specified cell in the column and row.
Declaration
@MainActor optional func tableView(_ tableView: NSTableView, toolTipFor cell: NSCell, rect: NSRectPointer, tableColumn: NSTableColumn?, row: Int, mouseLocation: NSPoint) -> StringParameters
- tableView:
The table view that sent the message.
- cell:
The cell.
- rect:
The proposed active area of the tooltip. You can modify
rectto provide an alternative active area. - tableColumn:
The table column.
- row:
The row index.
- mouseLocation:
The mouse location.
Return Value
A string that should be displayed in the tooltip. Return nil or the empty string if no tooltip is desired.
Discussion
By default, rect is computed as
[cell drawingRectForBounds:cellFrame]. Note that tooltips are also known as help tags.