---
title: parent
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nswindow/parent
---

# parent

The parent window to which the window is attached as a child.

## Declaration

```swift
weak var parent: NSWindow? { get set }
```

## Discussion

Discussion This property should be set from a subclass when it is overridden by a subclass’s implementation. It should not be set otherwise. Note that calling orderOut(_:) on a child window causes the window to be removed from its parent window before it is itself removed.

## See Also

### Managing Attached Windows

- [childWindows](appkit/nswindow/childwindows.md)
- [addChildWindow(_:ordered:)](appkit/nswindow/addchildwindow(_:ordered:).md)
- [removeChildWindow(_:)](appkit/nswindow/removechildwindow(_:).md)
