On Sep 1, 2009, at 12:38, Matthias Arndt wrote:

Under Mac OS X 10.5 I wrote an application with an NSScrollView containing a custom view. The NSScrollView was composed using IB and the "autohidesScrollers" option checked. As long as the content fits into the NSScrollView the scrollers were hidden. If the NSClipView was zoomed (using scaleUnitSquareToSize) to a size larger than the NSScrollView the scrollers became visible. Life was easy ...

Yesterday I updated to Snow Leopard and the behaviour changed:

When zoomin in the scrollers remain invisible! I can scroll (e. g. using the scrollball of my mouse), but the scrollers aren't shown. And now something really strange (at least for me): After resizing the window the scrollers appear!

I already tried to send needsDisplay:YES to all subviews and checked the scrollers properties of the NSScrollView: hasVerticalScrollers / hasHorizontalScroller / autohidesScrollers are all set.

My current bypass is to show the scroller always by setAutohidesScrollers:NO, but I'd like to understand what causes the problem.

FWIW, I ran into something vaguely similar yesterday that had me scratching my head for a while.

It turned out that the problem was that the scroll view frame had gotten messed up in the XIB file, so that the scroll view was a lot bigger than the window. Check your view frames in IB, and if you don't see anything obvious (like a bottom Y coordinate that's significantly negative), try setting a breakpoint somewhere in your code where your custom view is available, and check the custom view frame, clip view frame and scroll view frame (and possibly the bounds rects too) to see if things are mis-sized, mis-placed or just missing.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to