<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSRuleEditor/subrowIndexes(forRow:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSRuleEditor(im)subrowIndexesForRow:"
  },
  "title" : "subrowIndexes(forRow:)"
}
-->

# subrowIndexes(forRow:)

Returns the immediate subrows of a given row.

```
func subrowIndexes(forRow rowIndex: Int) -> IndexSet
```

## Parameters

`rowIndex`

The index of a row in the receiver, or `-1` to get the top-level rows.
  
  > Important:
  > Raises an `NSRangeException` if `rowIndex` is less than `-1` or greater than or equal to the number of rows.

## Return Value

The immediate subrows of the row at `rowIndex`.

## Discussion

Rows are numbered starting at `0`.

---

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)