Re: Line/page scrolling an NSScrollView
Re: Line/page scrolling an NSScrollView
- Subject: Re: Line/page scrolling an NSScrollView
- From: Allan Odgaard <email@hidden>
- Date: Sun, 11 Apr 2004 04:55:22 +0200
On 11. Apr 2004, at 2:09, Glen Low wrote:
You'll need to implement the moveUp:/moveDown: action methods in the
embedded view and have these use scrollRectToVisible: or
scrollToPoint:.
That's what I thought. But consider this: the NSScrollView already
*knows* how to scroll by a line, since it does so when you click on
the up-arrow or down-arrow. How do I use that inbuilt functionality?
Yes, I do catch your drift, but probably scroll line down can be made
simply with:
[self scrollRectToVisible:
NSOffsetRect([self visibleRect],
0, [[self enclosingScrollView] verticalLineScroll]
)];
So any solution involving having the scroll view believe the arrow
gadgets where clicked, is probably more complex.
[...] Strange though that the NSScrollView doesn't implement any of
the scrollxxx methods.
Agree! :)
** Cocoa FAQ: <
http://www.alastairs-place.net/cocoa/faq.txt> **
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.