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

# isSelectable

A Boolean value that controls whether the text views sharing the receiver’s layout manager allow the user to select text.

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

## Discussion

<doc://com.apple.documentation/documentation/Swift/true> to allow the user to select text of all text views sharing the receiver’s layout manager; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

If a text view is made not selectable, it’s also made not editable, and buttons on the Find panel are dimmed. Text views are by default both editable and selectable

> Note:
> Non-selectable text views do not process any mouse events. If for some reason it is necessary to disallow user selection changes in a text view that must handle mouse events, you can make the text view selectable but implement the delegate method ``doc://com.apple.appkit/documentation/AppKit/NSTextViewDelegate/textView(_:willChangeSelectionFromCharacterRanges:toCharacterRanges:)`` to disallow selection changes.

---

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)