• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to create a side drawer of fixed height
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How to create a side drawer of fixed height
      • From: Jonathon Mah <email@hidden>
    • Re: How to create a side drawer of fixed height
      • From: Scott Stevenson <email@hidden>
  • Prev by Date: Re: cocoa bindings and strings shown in 2 different lines of the same table column and row delay in displaying
  • Next by Date: (no subject)
  • Previous by thread: Re: cocoa bindings and strings shown in 2 different lines of the same table column and row delay in displaying
  • Next by thread: Re: How to create a side drawer of fixed height
  • Index(es):
    • Date
    • Thread