I have a NSSplitView, with three views. I wan't the first view (from the left) to be 100.0 wide and I want the second (from the left) to be 250.0 wide. I also want the width of those two views to remain fixed.
So, in applicationDidFinishLoading
is set the position.
[mainSplitView setPosition:100.0 ofDividerAtIndex:0];
[mainSplitView setPosition:350.0 ofDividerAtIndex:1];
I also set the delegate:
[mainSplitView setDelegate:self];
Lastly, I implemented the following part of the protocol:
- (NSRect)splitView:(NSSplitView *)splitView effectiveRect:(NSRect)proposedEffectiveRect forDrawnRect:(NSRect)drawnRect ofDividerAtIndex:(NSInteger)dividerIndex
{
return NSZeroRect;
}
However, when I resize the entire window, the sizes of the all views change. I only want the third view to change it's size. What do I need to to prevent this behavior?
No, I do not want to use a third party library.