<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSlider/acceptsFirstMouse(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSlider(im)acceptsFirstMouse:"
  },
  "title" : "acceptsFirstMouse(for:)"
}
-->

# acceptsFirstMouse(for:)

Returns a Boolean value indicating whether a mouse-down event both activates the window and starts dragging the slider’s knob.

```
func acceptsFirstMouse(for event: NSEvent?) -> Bool
```

## Parameters

`event`

The mouse-down event.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the receiver accepts the first mouse-down event; otherwise, <doc://com.apple.documentation/documentation/Swift/false>. Returns <doc://com.apple.documentation/documentation/Swift/true> by default.

## Discussion

If you want the slider to wait for its own mouse-down event, you must override this method.

---

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)