<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSScrollView/hasVerticalRuler",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSScrollView(py)hasVerticalRuler"
  },
  "title" : "hasVerticalRuler"
}
-->

# hasVerticalRuler

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

```
var hasVerticalRuler: Bool { get set }
```

## Discussion

When the value of this method is <doc://com.apple.documentation/documentation/Swift/true>, the scroll view allocates a vertical ruler the first time it’s needed.

Display of rulers is controlled using the [`rulersVisible`](/documentation/AppKit/NSScrollView/rulersVisible) property.

---

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)