---
title: hasHorizontalRuler
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsscrollview/hashorizontalruler
---

# hasHorizontalRuler

A Boolean that indicates whether the scroll view keeps a horizontal ruler object.

## Declaration

```swift
var hasHorizontalRuler: Bool { get set }
```

## Discussion

Discussion When the value of this method is true, the scroll view allocates a horizontal ruler the first time it’s needed. Display of rulers is controlled using the rulersVisible property.

## See Also

### Managing Rulers

- [rulerViewClass](appkit/nsscrollview/rulerviewclass.md)
- [horizontalRulerView](appkit/nsscrollview/horizontalrulerview.md)
- [hasVerticalRuler](appkit/nsscrollview/hasverticalruler.md)
- [verticalRulerView](appkit/nsscrollview/verticalrulerview.md)
- [rulersVisible](appkit/nsscrollview/rulersvisible.md)
