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

# orderedIndex

The zero-based position of the window, based on its order from front to back among all visible application windows.

```
var orderedIndex: Int { get set }
```

## Discussion

If you set this property to an index that’s out of range, the system sets the position to the nearest value that’s in range.

---

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)