NSTabview shrinks too much
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