Re: NSScrollView content origin (flipping an NSScrollView)
Re: NSScrollView content origin (flipping an NSScrollView)
- Subject: Re: NSScrollView content origin (flipping an NSScrollView)
- From: Michael Watson <email@hidden>
- Date: Mon, 27 Nov 2006 12:42:40 -0500
"And then complaining"? Why do you have such an attitude, Matt? :-/
Perhaps I wasn't as clear as I thought. My question is apparently the
same question a lot of people have had, as seen in the link Erik Buck
provided (which was informative, if interestingly complex). It's not
that I don't know that I'm drawing something at 0,0; the question was
how to pin the view itself to the top of a scroll view, a la setting -
isFlipped:YES on the custom view inside the scroll view. Setting the
struts on the view inside the scroll view wasn't working.
(Imagine a scroll view whose margins follow the size of a window.
Resizing the window will resize the scroll view. If the scroll view
becomes large enough, the view inside the scroll view sticks to the
bottom. Doesn't look right.)
http://www.cocoabuilder.com/search/archive/cocoa?words=nsscrollview
+isflipped
That's what I'm talking about.
I've gone ahead and reworked my positioning code to deal with a
flipped coordinate system, since -isFlipped does what I needed. I was
hoping I wouldn't have to do that, but it wasn't as large of a chore
as I assumed.
Code rewritten, moving on. -isFlipped + reworked coordinate math ==
solution.
--
m-s
On 26 Nov, 2006, at 14:39, Matt Neuburg wrote:
On Sat, 25 Nov 2006 22:25:36 -0500, "Michael Watson" <mikey-
email@hidden>
said:
eirk buck wrote:
http://www.cocoadev.com/index.pl?CenteringInsideNSScrollView
You have to be kidding me. This and the things linked to here seem
like SERIOUS overkill for pinning a view to the top of a scroll view.
Surely there's a simpler way.
There is no "top of a scroll view". There is the top of a (scroll
view's)
document view. If you want something to appear at the top of a
scroll view's
document view, then draw it there. You are drawing it at the bottom
of the
document view and then complaining that it's being shown at the
bottom of
the document view. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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