How to create a side drawer of fixed height
How to create a side drawer of fixed height
- Subject: How to create a side drawer of fixed height
- From: "Tim Armes" <email@hidden>
- Date: Mon, 27 Nov 2006 10:23:24 +0100
Hi all,
I'm trying to create a drawer with a fixed maximum height, so that it
doesn't display a lot of unncessary empty space when the window is tall..
To do this I have a method that's responsible for figuring out the trailing
offset to apply given the frame size of the parent. When the window resizes
I call my method.
The problem however lies in calculating this offset. To calculate the
required offset, I need the following information:
The frame height of the parent (ph)
My required content height for the drawer (ch)
The actual frame height of the drawer (based on ch) (dh) *
The actual lead offset (even when 0 is chosen for the leading offset, the
drawer is still offset with respect to the parent window's frame) (lh) *
It would then be trivial to calculate the trailing offset as ph - (dh + lh).
I've marked the information that I can't find a way to retrieve with a *.
Can anyone point me in the right direction?
Thanks,
Tim
_______________________________________________
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