2

I suspect that the number of dividers in an NSSplitView is equal to [[MySplitViewObject subviews] count] -1 and that the index of any given divider in an NSSplitView is equal to the index of the subview to the left of or above the divider (depending on the NSSplitView's orientation).

Is it, or is there some undocumented and exposed property of the NSSplitView that returns a list of the dividers?

Randall
  • 725
  • 9
  • 27
  • I suspect that even if there is a property that does enumerate the dividers of an NSSplitView, that I should not rely on it because it could change without notice when the OS is next updated. – Randall Mar 04 '10 at 10:24

1 Answers1

2

I don't know any other way to know the number of dividers in a NSSplitView. The result is always accurate, because even hidden subviews are only collapsed.

As for the order (both views and dividers), it is guaranteed by the documentation:

Divider indices are zero-based, with the topmost (in horizontal split views) or leftmost (vertical) divider having an index of 0.

Note: You can also create a category that hides the computation of the number of dividers.

Laurent Etiemble
  • 27,111
  • 5
  • 56
  • 81