• 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
NSTabview shrinks too much
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTabview shrinks too much


  • Subject: NSTabview shrinks too much
  • From: Mike Hanna <email@hidden>
  • Date: Wed, 22 Mar 2006 12:57:56 -0800

I want to shrink an nstabview to the size of the total of all view heights in the tabviewitem that it will select to(using willSelectTabViewItem: delegate).

I get 236 for the total of all subviews in the tabviewitem I'm switching to.

but when I shrink to 236.0 it shrinks too much

float viewHeight = [self contentHeightOfSubviewsForTabViewItem: [fTermRefTypesTabs selectedTabViewItem]];
float newViewHeight = [self contentHeightOfSubviewsForTabViewItem:tabViewItem]; // 236.0


		NSRect tabViewFrame = [fTermRefTypesTabs frame];
		tabViewFrame.origin.y += tabViewFrame.size.height;
		tabViewFrame.origin.y -= newViewHeight;
		tabViewFrame.size.height = newViewHeight;
		[fTermRefTypesTabs setFrame:tabViewFrame];
		[fTermRefTypesTabs setNeedsDisplay:YES];

however, if I plug in roughly 340 for newViewHeight.. it fits right (subviews don't get squished)

the subviews must be contained in something.., something about 100-120 px high ... what?

any idea?
Mike

--
Mike Hanna
email@hidden
iChat: michaelkhanna(AIM)



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSTabview shrinks too much
      • From: j o a r <email@hidden>
  • Prev by Date: Re: newbie question re. cocoa front-end to sql db
  • Next by Date: Re: NSUserDefaults objects
  • Previous by thread: Re: NSUserDefaults objects
  • Next by thread: Re: NSTabview shrinks too much
  • Index(es):
    • Date
    • Thread