---
title: isSelectionByRect
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsmatrix/isselectionbyrect
---

# isSelectionByRect

A Boolean that indicates whether the user can select a rectangle of cells in the receiver by dragging the cursor.

## Declaration

```swift
var isSelectionByRect: Bool { get set }
```

## Discussion

Discussion When the value of this property is true, the matrix allows the user to select a rectangle of cells by dragging. When the value of this property is false, selection in the matrix is on a row-by-row basis. The default value of this property is true.

## See Also

### Related Documentation

- [setSelectionFrom(_:to:anchor:highlight:)](appkit/nsmatrix/setselectionfrom(_:to:anchor:highlight:).md)

### Configuring the Matrix Object

- [mode](appkit/nsmatrix/mode-swift.property.md)
- [allowsEmptySelection](appkit/nsmatrix/allowsemptyselection.md)
