• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[SOLVED]Re: Overcoming crappiness of NSSplitView - what's the magic?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED]Re: Overcoming crappiness of NSSplitView - what's the magic?


  • Subject: [SOLVED]Re: Overcoming crappiness of NSSplitView - what's the magic?
  • From: Graham Cox <email@hidden>
  • Date: Wed, 16 Sep 2009 10:46:30 +1000

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" <email@hidden > 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 (email@hidden)

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:
This email sent to email@hidden


References: 
 >Overcoming crappiness of NSSplitView - what's the magic? (From: Graham Cox <email@hidden>)
 >Re: Overcoming crappiness of NSSplitView - what's the magic? (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: Overcoming crappiness of NSSplitView - what's the magic?
  • Next by Date: How to debug over-release of private Cocoa object?
  • Previous by thread: Re: Overcoming crappiness of NSSplitView - what's the magic?
  • Next by thread: Re: Overcoming crappiness of NSSplitView - what's the magic?
  • Index(es):
    • Date
    • Thread