Re: align view in NSDrawer
Re: align view in NSDrawer
- Subject: Re: align view in NSDrawer
- From: James Bucanek <email@hidden>
- Date: Mon, 15 Jan 2007 16:01:39 -0700
Brian Weitzner wrote on Monday, January 15, 2007:
> I have a view in an NSDrawer (which is on the right side of the
>parent window) and it keeps aligning it on the bottom.
It's not "aligning" per sey, that's just where the origin of the window is. Unless you move your views to some other location, they tend to stay where you put them.
>So it just
>looks ridiculous because the drawer is the height of the window, but
>the contents are smaller and are aligned along the bottom. Is there
>an easy way to get the drawer to align the content along the top?
You can either create a flipped NSView that will put your origin at the top, or you can set the margins of the drawer so that it isn't the full height of the window. It's not trivial, but not outragiously difficult either. Look for an example project called "drawer madness" (or something like that). It shows how to create drawers that have different offsets and sizes.
--
James Bucanek
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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