---
title: documentRect
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsclipview/documentrect
---

# documentRect

The rectangle defining the document view’s frame, adjusted to the size of the clip view if the document view is smaller.

## Declaration

```swift
var documentRect: NSRect { get }
```

## Discussion

Discussion The document rectangle is used in conjunction with an NSClipView object’s bounds rectangle to determine values for the indicators of relative position and size between the NSClipView and its document view. For example, NSScrollView uses these rectangles to set the size and position of the knobs in its scrollers. When the document view is much larger than the NSClipView, the knob is small; when the document view is near the same size, the knob is large; and when the document view is the same size or smaller, there is no knob.

## See Also

### Related Documentation

- [reflectScrolledClipView(_:)](appkit/nsscrollview/reflectscrolledclipview(_:).md)

### Accessing the Visible Portion

- [documentVisibleRect](appkit/nsclipview/documentvisiblerect.md)
