On Oct 23, 2008, at 2:41 PM, Eric Gorr wrote:
I have an NSPanel and need to implement some window shading functionality - i.e. the content area is hidden and only the title bar remains. Unfortunately, this means that the height of the content area does become zero.

I see. Same principle as the stacked inspector panes in IB itself, or in apps like OmniGraffle and Create.

A workaround (which I've just implemented) that seems to work is when the window shade is activated, I remove THE_VIEW and then shrink the window. When the window shade is activated again, indicating that the contents of the panel should reappear, I grow the window and then add THE_VIEW back to the content view. This probably wouldn't work well if I needed to animate the shrinking & growing, but I don't need to worry about that for now.

Of the three apps I tried (IB, OmniGraffle, and Create), only Create animates the transition. Create's panes don't seem to need autoresizing behavior -- their controls all seem to be in fixed positions -- so it has an easier problem than you. I wonder if the others use the same view-swapping workaround you do.

--Andy

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to