<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableView/columnIndexes(in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTableView(im)columnIndexesInRect:"
  },
  "title" : "columnIndexes(in:)"
}
-->

# columnIndexes(in:)

Returns the indexes of the table view’s columns that intersect the specified rectangle.

```
func columnIndexes(in rect: NSRect) -> IndexSet
```

## Parameters

`rect`

The rectangle in the table view’s coordinate system to test for column enclosure.

## Return Value

New <doc://com.apple.documentation/documentation/Foundation/NSIndexSet> object containing the indexes of the table view’s columns that intersect with `rect`.

## Discussion

Columns that return <doc://com.apple.documentation/documentation/Swift/true> for the `NSTableColumn` method [`isHidden`](/documentation/AppKit/NSTableColumn/isHidden) are excluded from the results.

---

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)