---
title: "selectCell(atRow:column:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsmatrix/selectcell(atrow:column:)"
---

# selectCell(atRow:column:)

Selects the cell at the specified row and column within the receiver.

## Declaration

```swift
func selectCell(atRow row: Int, column col: Int)
```

## Parameters

- `row`: The row of the cell to select.
- `col`: The column of the cell to select.

## Discussion

Discussion If the specified cell is an editable text cell, its text is selected. If either row or column is –1, then the current selection is cleared (unless the receiver is an NSRadioModeMatrix and doesn’t allow empty selection). This method redraws the affected cells.

## See Also

### Related Documentation

- [mode](appkit/nsmatrix/mode-swift.property.md)
- [selectCell(_:)](appkit/nscontrol/selectcell(_:).md)
- [allowsEmptySelection](appkit/nsmatrix/allowsemptyselection.md)

### Selecting and Deselecting Cells

- [selectCell(withTag:)](appkit/nsmatrix/selectcell(withtag:).md)
- [selectAll(_:)](appkit/nsmatrix/selectall(_:).md)
- [keyCell](appkit/nsmatrix/keycell.md)
- [setSelectionFrom(_:to:anchor:highlight:)](appkit/nsmatrix/setselectionfrom(_:to:anchor:highlight:).md)
- [deselectAllCells()](appkit/nsmatrix/deselectallcells().md)
- [deselectSelectedCell()](appkit/nsmatrix/deselectselectedcell().md)
