On Wednesday, August 26, 2009 8:22:24 PM, Brandon Walkin <bwal...@gmail.com> wrote: > This can be done completely in IB if you use BWToolkit. > http://brandonwalkin.com/bwtoolkit/ > > Demo video: http://brandonwalkin.com/blog/videos/iCalSplitView.mov > > Brandon
Wow, that is a *really* impressive control! Thanks for the video and for pointing out your toolkit. I'll be checking it out. In this app my needs are very limited (for now at least!) so I implemented a simple delegate method. Everyone's input helped tremendously. Thanks to everyone who posted: - (void)splitView:(NSSplitView *)sender resizeSubviewsWithOldSize:(NSSize)oldSize { NSRect newFrame = [sender frame]; NSArray * subviews = [sender subviews]; CGFloat dividerThickness = [sender dividerThickness]; NSView * leftView = [subviews objectAtIndex:0]; NSRect leftFrame = [leftView frame]; NSView * rightView = [subviews objectAtIndex:1]; NSRect rightFrame = [rightView frame]; // Height always follows split view leftFrame.size.height = rightFrame.size.height = newFrame.size.height; // Width of left frame is left untouched; All width resizing occurs in right frame rightFrame.size.width = newFrame.size.width - leftFrame.size.width - dividerThickness; // Post our changes [leftView setFrame:leftFrame]; [rightView setFrame:rightFrame]; } _______________________________________________ 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