Thanks to all - I got it working as I need using the splitView:resizeSubviewsWithOldSize: method.

Still baffled as to why its design is so bad, but there are bigger fish to fry... ;-)

cheers, Graham





On 16/09/2009, at 1:06 AM, Andy Lee wrote:

Just one delegate method seems to do it for me, but I wrote this quick so I might be overlooking something:

- (void)splitView:(NSSplitView *)sender resizeSubviewsWithOldSize: (NSSize)oldSize
{
        float desiredTopViewHeight = [_topView frame].size.height;
        [sender adjustSubviews];
        NSRect frameOne = [_topView frame];
        NSRect frameTwo = [_bottomView frame];
        
        frameOne.size.height = desiredTopViewHeight;
frameTwo.size.height = [sender frame].size.height - desiredTopViewHeight - [sender dividerThickness];
        
        [_topView setFrame:frameOne];
        [_bottomView setFrame:frameTwo];
}

--Andy



On Tuesday, September 15, 2009, at 10:01AM, "Graham Cox" <graham....@bigpond.com > wrote:
Ok, I'm beating my head on this one, wasting time I have better things to spend it on. NSSplitView is a travesty, but we're stuck with it, so
I need to know the magic incantation of delegate methods and other
voodoo needed to implement the following for a split view with one
upper and one lower pane.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to