<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSMatrix/highlightCell(_:atRow:column:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMatrix(im)highlightCell:atRow:column:"
  },
  "title" : "highlightCell(_:atRow:column:)"
}
-->

# highlightCell(_:atRow:column:)

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

```
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.

---

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)