---
title: "tableView(_:toolTipFor:rect:tableColumn:row:mouseLocation:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstableviewdelegate/tableview(_:tooltipfor:rect:tablecolumn:row:mouselocation:)"
---

# 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

```swift
@MainActor optional func tableView(_ tableView: NSTableView, toolTipFor cell: NSCell, rect: NSRectPointer, tableColumn: NSTableColumn?, row: Int, mouseLocation: NSPoint) -> String
```

## Parameters

- `tableView`: The table view that sent the message.
- `cell`: The cell.
- `rect`: The proposed active area of the tooltip. You can modify rect to provide an alternative active area.
- `tableColumn`: The table column.
- `row`: The row index.
- `mouseLocation`: The mouse location.

## Return Value

Return Value A string that should be displayed in the tooltip. Return nil or the empty string if no tooltip is desired.

## Discussion

Discussion By default, rect is computed as [cell drawingRectForBounds:cellFrame]. Note that tooltips are also known as help tags.

## See Also

### Providing cells for rows and columns

- [tableView(_:willDisplayCell:for:row:)](appkit/nstableviewdelegate/tableview(_:willdisplaycell:for:row:).md)
- [tableView(_:dataCellFor:row:)](appkit/nstableviewdelegate/tableview(_:datacellfor:row:).md)
- [tableView(_:shouldShowCellExpansionFor:row:)](appkit/nstableviewdelegate/tableview(_:shouldshowcellexpansionfor:row:).md)
