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

# focusedColumn()

Returns the currently focused column.

```
func focusedColumn() -> Int
```

## Return Value

The index of the column, or -1 if there is no focused column

## Discussion

The focus interaction will always be on the [`selectedRow`](/documentation/AppKit/NSTableView/selectedRow) of the table. If the [`selectedRow`](/documentation/AppKit/NSTableView/selectedRow) is a full width cell, then `focusedColumn` will return `1` when focused.

> Note:
> This method is not applicable for ``doc://com.apple.appkit/documentation/AppKit/NSView``-based table views. Instead, the view that has focus will be the ``doc://com.apple.appkit/documentation/AppKit/NSWindow/firstResponder``.

---

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)