Forcing an NSScroller to think its scroll document has a different width. Possible?
Forcing an NSScroller to think its scroll document has a different width. Possible?
- Subject: Forcing an NSScroller to think its scroll document has a different width. Possible?
- From: Charles Constant <email@hidden>
- Date: Sun, 23 Aug 2015 09:31:22 -0700
Hi ladies and gentlemen,
I'm trying to make an infinite scrollview, but I've gotten stuck in the mud.
What I want to do is split, when the knob(thumb) reaches a point beyond the
right edge, is have it split into two, so that you see its right side,
peeking in from the left edge. That's the part I've got working.
The part I'm having problems with is the document width. To give the
illusion of the view being infinite, while still scrolling smoothly, I need
to add a duplicate section. When the user scrolls left beyond 0, I need to
copy the right side of the document, and a when he/she scrolls being the
right side, I need to copy the left side to the rightmost portion of the
screen.
So (at long last) the problem is: I need the document to be oversize (e.g.:
120% the width of its content with 20% duplicated) but in order for my
NSScroller to function the way I want, I need the NSScroller to still see
the width as 100%. I thought overriding the x position in "rectForPart"
would suffice, but it doesn't. It *looks* correct, sure enough, but when I
try to drag the knob, my clicks and drags no longer match up with the
visual location of the knob.
I'd greatly appreciate any advice you may have. It would be great if there
were a method I could override to tell the computer where the actual hit
area is, but I figured that would be "rectForPart" and it's apparently not
:(
Cheers,
Charles
_______________________________________________
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