<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTrackingArea/Options-swift.struct/enabledDuringMouseDrag",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSTrackingAreaOptions@NSTrackingEnabledDuringMouseDrag"
  },
  "title" : "enabledDuringMouseDrag"
}
-->

# enabledDuringMouseDrag

The owner receives [`NSMouseEntered`](/documentation/AppKit/NSMouseEntered) events when the mouse cursor is dragged into the tracking area. If this option is not specified, the owner receives mouse-entered events when the mouse is moved (no buttons pressed) into the tracking area and on [`NSLeftMouseUp`](/documentation/AppKit/NSLeftMouseUp) events after a mouse drag.

```
static var enabledDuringMouseDrag: NSTrackingArea.Options { get }
```

## Discussion

[`NSMouseExited`](/documentation/AppKit/NSMouseExited) and [`NSMouseEntered`](/documentation/AppKit/NSMouseEntered) events are paired so their delivery is indirectly affected. That is, if a `NSMouseEntered` event is generated and the mouse cursor subsequently moves out of the tracking area, a `NSMouseExited` event is generated regardless if the mouse is moved or dragged, independent of this constant. This value specifies a behavior of the tracking area defined by the [`NSTrackingArea`](/documentation/AppKit/NSTrackingArea).

---

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)