---
title: "highlightCell(_:atRow:column:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsmatrix/highlightcell(_:atrow:column:)"
---

# highlightCell(_:atRow:column:)

Highlights or unhighlights the cell at the specified row and column location.

## Declaration

```swift
func highlightCell(_ flag: Bool, atRow row: Int, column col: Int)
```

## Parameters

- `flag`: doc://com.apple.documentation/documentation/Swift/true to highlight the cell; doc://com.apple.documentation/documentation/Swift/false to unhighlight the cell.
- `row`: The row containing the cell.
- `col`: The column containing the cell.

## See Also

### Displaying and Highlighting Cells

- [drawCell(atRow:column:)](appkit/nsmatrix/drawcell(atrow:column:).md)
