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

# rulerView(_:handleMouseDownWith:)

Adds a left tab marker to the ruler at the location clicked.

```
func rulerView(_ ruler: NSRulerView, handleMouseDownWith event: NSEvent)
```

## Parameters

`ruler`

The ruler view sending the message.

`event`

The mouse down event.

## Discussion

A subclass can override this method to provide other behavior, such as creating guidelines. This method is invoked once with `theEvent` when the user first clicks the ruler area of `aRulerView`, as described in the [`NSRulerView`](/documentation/AppKit/NSRulerView) class specification.

---

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)