I was wondering if there's a way you can programatically change the position of the splitter.
Asked
Active
Viewed 580 times
3
-
what have you tried? have you tried resizing the subviews inside the panes? – Volker Jun 12 '14 at 13:40
2 Answers
5
You can change the position of the divider using setPosition:ofDividerAtIndex:

GoodSp33d
- 6,252
- 4
- 35
- 67
1
Thanks for the quick reply...
And for interest sake, I found this on the way (might be useful for others)
Thanks...And for interest sake, I found this on the way (might be useful for others) which I found here: on Github
- (CGFloat)positionOfDividerAtIndex:(NSInteger)dividerIndex {
while (dividerIndex >= 0 && [self isSubviewCollapsed:[[self subviews] objectAtIndex:dividerIndex]])
dividerIndex--;
if (dividerIndex < 0)
return 0.0f;
NSRect priorViewFrame = [[[self subviews] objectAtIndex:dividerIndex] frame];
return [self isVertical] ? NSMaxX(priorViewFrame) : NSMaxY(priorViewFrame);
}
I personally used -(float)
, so use whichever "floats" your boat :D

Adrian Sluyters
- 2,186
- 1
- 16
- 21