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

# outlineView(_:shouldShowCellExpansionFor:item:)

Invoked to allow the delegate to control cell expansion for a specific column and item.

```
@MainActor optional func outlineView(_ outlineView: NSOutlineView, shouldShowCellExpansionFor tableColumn: NSTableColumn?, item: Any) -> Bool
```

## Parameters

`outlineView`

The outline view that sent the message.

`tableColumn`

A table column in the outline view.

`item`

An item in the outline view.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> to allow an expansion tooltip to appear in the column `tableColumn` for item `item`, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

Cell expansion can occur when the mouse hovers over the specified cell and the cell contents are unable to be fully displayed within the cell. If this method returns <doc://com.apple.documentation/documentation/Swift/true>, the full cell contents will be shown in a special floating tool tip view, otherwise the content is truncated.

---

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)