---
title: "rulerView(_:handleMouseDownWith:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextview/rulerview(_:handlemousedownwith:)"
---

# rulerView(_:handleMouseDownWith:)

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

## Declaration

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

## Parameters

- `ruler`: The ruler view sending the message.
- `event`: The mouse down event.

## Discussion

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 class specification.

## See Also

### Supporting the ruler view

- [rulerView(_:didMove:)](appkit/nstextview/rulerview(_:didmove:).md)
- [rulerView(_:willMove:toLocation:)](appkit/nstextview/rulerview(_:willmove:tolocation:).md)
- [rulerView(_:shouldMove:)](appkit/nstextview/rulerview(_:shouldmove:).md)
- [rulerView(_:didRemove:)](appkit/nstextview/rulerview(_:didremove:).md)
- [rulerView(_:shouldRemove:)](appkit/nstextview/rulerview(_:shouldremove:).md)
- [rulerView(_:didAdd:)](appkit/nstextview/rulerview(_:didadd:).md)
- [rulerView(_:shouldAdd:)](appkit/nstextview/rulerview(_:shouldadd:).md)
- [rulerView(_:willAdd:atLocation:)](appkit/nstextview/rulerview(_:willadd:atlocation:).md)
