---
title: textContainerInset
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstextview/textcontainerinset
---

# textContainerInset

The empty space the receiver leaves around its associated text container.

## Declaration

```swift
var textContainerInset: NSSize { get set }
```

## Discussion

Discussion It is possible to set the text container and view sizes and resizing behavior so that the inset cannot be maintained exactly, although the text system tries to maintain the inset wherever possible. In any case, the textContainerOrigin and size of the text container are authoritative as to the location of the text container within the view. The text itself can have an additional inset, inside the text container, specified by the lineFragmentPadding method of NSTextContainer.

## See Also

### Accessing text system objects

- [stronglyReferencesTextStorage](appkit/nstextview/stronglyreferencestextstorage.md)
- [fieldEditor()](appkit/nstextview/fieldeditor().md)
- [textContainer](appkit/nstextview/textcontainer.md)
- [replaceTextContainer(_:)](appkit/nstextview/replacetextcontainer(_:).md)
- [textContainerOrigin](appkit/nstextview/textcontainerorigin.md)
- [invalidateTextContainerOrigin()](appkit/nstextview/invalidatetextcontainerorigin().md)
- [textLayoutManager](appkit/nstextview/textlayoutmanager.md)
- [layoutManager](appkit/nstextview/layoutmanager.md)
- [textContentStorage](appkit/nstextview/textcontentstorage.md)
- [textStorage](appkit/nstextview/textstorage.md)
