---
title: "rect(ofColumn:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstableview/rect(ofcolumn:)"
---

# rect(ofColumn:)

Returns the rectangle containing the column at the specified index.

## Declaration

```swift
func rect(ofColumn column: Int) -> NSRect
```

## Parameters

- `column`: The index in the doc://com.apple.appkit/documentation/AppKit/NSTableView/tableColumns array of a column in the table view.

## Return Value

Return Value The rectangle containing the column at columnIndex. Returns NSZeroRect if columnIndex lies outside the range of valid column indexes for the table view.

## Discussion

Discussion You can use this method to update a single column more efficiently than sending the table view a reloadData() message. [aTableView setNeedsDisplayInRect:[aTableView rectOfColumn:column]];

## See Also

### Related Documentation

- [headerRect(ofColumn:)](appkit/nstableheaderview/headerrect(ofcolumn:).md)

### Layout Support

- [userInterfaceLayoutDirection](appkit/nstableview/userinterfacelayoutdirection.md)
- [rect(ofRow:)](appkit/nstableview/rect(ofrow:).md)
- [rows(in:)](appkit/nstableview/rows(in:).md)
- [columnIndexes(in:)](appkit/nstableview/columnindexes(in:).md)
- [column(at:)](appkit/nstableview/column(at:).md)
- [row(at:)](appkit/nstableview/row(at:).md)
- [frameOfCell(atColumn:row:)](appkit/nstableview/frameofcell(atcolumn:row:).md)
- [columnAutoresizingStyle](appkit/nstableview/columnautoresizingstyle-swift.property.md)
- [sizeLastColumnToFit()](appkit/nstableview/sizelastcolumntofit().md)
- [noteNumberOfRowsChanged()](appkit/nstableview/notenumberofrowschanged().md)
- [tile()](appkit/nstableview/tile().md)
- [sizeToFit()](appkit/nstableview/sizetofit().md)
- [noteHeightOfRows(withIndexesChanged:)](appkit/nstableview/noteheightofrows(withindexeschanged:).md)
