<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSMatrix/isSelectionByRect",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMatrix(py)selectionByRect"
  },
  "title" : "isSelectionByRect"
}
-->

# isSelectionByRect

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

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

## Discussion

When the value of this property is <doc://com.apple.documentation/documentation/Swift/true>, the matrix allows the user to select a rectangle of cells by dragging. When the value of this property is <doc://com.apple.documentation/documentation/Swift/false>, selection in the matrix is on a row-by-row basis. The default value of this property is <doc://com.apple.documentation/documentation/Swift/true>.

## See Also

[`setSelectionFrom(_:to:anchor:highlight:)`](/documentation/AppKit/NSMatrix/setSelectionFrom(_:to:anchor:highlight:))

Programmatically selects a range of cells.



---

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)