---
title: "selectCell(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscontrol/selectcell(_:)"
---

# selectCell(_:)

Selects the specified cell and redraws the control as needed.

## Declaration

```swift
func selectCell(_ cell: NSCell)
```

## Parameters

- `cell`: The cell to select. The cell must belong to the receiver.

## Discussion

Discussion If the cell is already selected (or does not belong to the receiver), this method does nothing. If the cell belongs to the receiver and is not selected, this method changes its state to NSOnState and redraws the cell.

## See Also

### Deprecated Methods

- [selectedCell()](appkit/nscontrol/selectedcell().md)
- [selectedTag()](appkit/nscontrol/selectedtag().md)
- [setNeedsDisplay()](appkit/nscontrol/setneedsdisplay().md)
- [calcSize()](appkit/nscontrol/calcsize().md)
- [drawCell(_:)](appkit/nscontrol/drawcell(_:).md)
- [drawCellInside(_:)](appkit/nscontrol/drawcellinside(_:).md)
- [updateCell(_:)](appkit/nscontrol/updatecell(_:).md)
- [updateCellInside(_:)](appkit/nscontrol/updatecellinside(_:).md)
