Re: NSScrollView showing part of view with white space above
Re: NSScrollView showing part of view with white space above
- Subject: Re: NSScrollView showing part of view with white space above
- From: Aandi Inston via Cocoa-dev <email@hidden>
- Date: Sun, 13 Oct 2019 20:58:01 +0100
No auto-layout, identical coordinate systems. I found the solution, which
is entirely my fault of course, thanks
to your comment "It sounds like your NSView actually has white space at the
top." For the benefit of future
readers of this thread, here is the solution.
I assumed the underlying (scrolled) NSView must be correct because it
always was correct when shown without
the NSScrollView. (The NSScrollView was added only if the window layout
would not fit on screen). But, the
window was created from coordinates that are top down (origin top left).
This has been managed before using
any Cocoa code by something like this:
cocoa_y = window_interior_height - design_y
but of course, the window_interior_height is no longer interesting. I was
subtracting from too small a number,
and needed to be subtracting from the size assigned to the scrolled area.
So I really, really did have a
scrolled area with lots of white space at the top. Thank you for sending me
straight to the solution!
_______________________________________________
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