Re: NSTabView Sizing Question
Re: NSTabView Sizing Question
- Subject: Re: NSTabView Sizing Question
- From: Jens Alfke <email@hidden>
- Date: Fri, 26 Aug 2011 11:08:32 -0700
On Aug 26, 2011, at 10:43 AM, Conrad Shultz wrote:
> I have an NSTabView in a window and want to size it (and,
> subsequently, the window) to fully display the current tab view item's
> content view (i.e. [tabViewItem view]).
What I would do is, once you know the content view size you want, compute the difference between that size and the content’s current size, then grow the window by that amount.
The assumption is that that every pixel you grow the window also grows the content view by a pixel; this is usually true in the kind of window you’re describing, but if it isn’t, you might have to temporarily change some of the view autoresize masks while you do this.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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