Re: NSScrollView: Scrollers invisible under Mac OS X 10.6
Re: NSScrollView: Scrollers invisible under Mac OS X 10.6
- Subject: Re: NSScrollView: Scrollers invisible under Mac OS X 10.6
- From: Quincey Morris <email@hidden>
- Date: Tue, 1 Sep 2009 12:57:36 -0700
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 (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