I have having a problem working with NSScrollView. The code is in pieces all over the desk at the moment, but I'm asking in case someone recognises the symptoms, before I reduce this to a simple test case.
An NSScrollView is made from an NSView containing various NSControls. The NSView is fine before the NSScrollView and, when the NSScrollView is shown, looks fine. It shows the top portion of the NSView, as expected. But, the vertical scroll bar position is at the BOTTOM of the window. Now, the curious part starts. If the NSScrollView is scrolled upwards, the content in the window moves down (as normal). What we now see is a large white space at the top of the NSScrollView, and below that the same view portion we first saw. To put it another way, the NSView we scroll is a view containing white space at the top, and part of the original NSView below that. Yet all the rectangles I can find show (0,0) as the origin as I'd expect. Note that this is NOT a question about how to make the scroll bar first appear at the top. If I use [myScrollView.contentView scrollPoint:NSMakePoint(0,height)] I get the same effect as dragging the scroll bar to the top. Maybe ASCII art can explain Complete NSView (to be scrolled) +------------- + + TOP LABEL + + Explanation + + [x] Check box + + {Cancel} {OK} + +----------------- Initial NSScrollView (scroll bar shown at BOTTOM) +------------- + + TOP LABEL + + Explanation + + [x] Check box +--------------- Effect of moving scroll bar to the top +------------- + + + + + TOP LABEL + +--------------- Scrolling does not make the Cancel and OK buttons appear at all. Thanks in advance! _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com