<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSOutlineViewDelegate/outlineView(_:toolTipFor:rect:tableColumn:item:mouseLocation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSOutlineViewDelegate(im)outlineView:toolTipForCell:rect:tableColumn:item:mouseLocation:"
  },
  "title" : "outlineView(_:toolTipFor:rect:tableColumn:item:mouseLocation:)"
}
-->

# outlineView(_:toolTipFor:rect:tableColumn:item:mouseLocation:)

When the cursor pauses over a given cell, the value returned from this method is displayed in a tooltip.

```
@MainActor optional func outlineView(_ outlineView: NSOutlineView, toolTipFor cell: NSCell, rect: NSRectPointer, tableColumn: NSTableColumn?, item: Any, mouseLocation: NSPoint) -> String
```

## Parameters

`outlineView`

The outline view that sent the message.

`cell`

The cell for which to generate a tooltip.

`rect`

The proposed active area of the tooltip. To control the default active area, you can modify the `rect` parameter. By default, `rect` is computed as `[cell drawingRectForBounds:cellFrame]`.

`tableColumn`

The table column that contains `cell`.

`item`

The item for which to display a tooltip.

`mouseLocation`

The current mouse location in view coordinates.

## Return Value

If you don’t want a tooltip at that location, return an empty string.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)