Using scrolling lists of controls and handling window resize.
Using scrolling lists of controls and handling window resize.
- Subject: Using scrolling lists of controls and handling window resize.
- From: Duncan Champney <email@hidden>
- Date: Mon, 21 Apr 2008 11:31:32 -0400
My app has a 3D view window that displays a large OpenGL view over
most of it's surface, along with a group of controls that run down the
left side of the window. The user can resize the window quite small,
which makes some of the controls disappear off the bottom of the
window. My solution is to put the controls into a scrolling view, so
that when the window gets small enough, a vertical scroller appears,
and the user can scroll down to the controls that are missing.
This works pretty well, except for one thing.
When the user makes the window bigger than the default size, the view
that contains the group of controls pins to the bottom of the window
instead of the top. That means that the controls slide down the
window, which looks really bad.
What I want to happen is for my controls to pin to the top of the
window. When the window gets smaller than it's default size, the
vertical scroller should appear and allow the user to scroll down to
the controls that are hidden. When the user resizes the window bigger
than the default size, the controls should stay anchored to the top of
the window.
I can't figure out how to do this in IB. Is there something I'm
missing in IB? It seems like the behavior I'm after should be fairly
common.
Somebody suggested making my scrolling view contain a custom view, and
overriding the -isFlipped method to make the view use flipped
coordinates. However, wouldn't that mean that the controls in my view
would then draw in reversed order?
Regards,
Duncan C
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden