Re: NSDrawer, IB "springs", etc.
Re: NSDrawer, IB "springs", etc.
- Subject: Re: NSDrawer, IB "springs", etc.
- From: Bill Cheeseman <email@hidden>
- Date: Thu, 22 Aug 2002 18:26:16 -0400
on 02-08-22 4:34 PM, Keith Renz at email@hidden wrote:
>
The drawer's content size is set at 235 with a min = 0 and a max = 300.
>
>
I have tried every combination of IB's springs for the view, tables and
>
buttons to get the behavior I want. I thought I understood what they mean,
>
but I guess I don't.
>
>
Can someone please give me a definitive explanation of the springs and what I
>
need to do to pin my drawer's contents to the drawer?
I can't be definitive, but I just worked my way through the same issues and
can make a few suggestions.
1. Drawers are resizable -- horizontally in your case -- by dragging the
edge. So keep that in mind while setting up your springs.
2. Drawers are resized (but not resizable by the user) at run time to fit
the calculated vertical height required by some internal formula related to
the current height of the parent window. So keep that in mind.
3. The origin of the drawer's DrawContentView is the bottom-left corner. So,
to keep the margin between user controls and the top edge of the
DrawContentView constant when the inevitable automatic vertical resizing of
the drawer takes place, you have to keep the margin spring at the top of the
DrawContentView uncoiled (straight), and the bottom margin spring or the
vertical resizing spring coiled. Then the top margin will remain constant,
and the views will grow or resize downwards at run time.
4. Point 3 applies to the DrawContentView within the drawer, too, as I
recall. You want a fixed 0 margin at all four edges and springs in the
middle box to let the DrawContentView grow and shrink with the drawer, as I
recall.
Hope this helps.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.