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

# selectText(atRow:column:)

Selects the text in the cell at the specified location and returns the cell.

## Declaration

```swift
func selectText(atRow row: Int, column col: Int) -> NSCell?
```

## Parameters

- `row`: The row containing the text to select.
- `col`: The column containing the text to select.

## Return Value

Return Value If it is both editable and selectable, the cell at the specified row and column. If the cell at the specified location, is either not editable or not selectable, this method does nothing and returns nil. If row and column indicate a cell that is outside the receiver, this method does nothing and returns the receiver.

## See Also

### Editing Text in Cells

- [selectText(_:)](appkit/nsmatrix/selecttext(_:).md)
- [textShouldBeginEditing(_:)](appkit/nsmatrix/textshouldbeginediting(_:).md)
- [textDidBeginEditing(_:)](appkit/nsmatrix/textdidbeginediting(_:).md)
- [textDidChange(_:)](appkit/nsmatrix/textdidchange(_:).md)
- [textShouldEndEditing(_:)](appkit/nsmatrix/textshouldendediting(_:).md)
- [textDidEndEditing(_:)](appkit/nsmatrix/textdidendediting(_:).md)
