Re: Setting a NSScrollView's Scroll Amount
Re: Setting a NSScrollView's Scroll Amount
- Subject: Re: Setting a NSScrollView's Scroll Amount
- From: Allan Odgaard <email@hidden>
- Date: Mon, 29 Mar 2004 10:20:51 +0200
On 29. Mar 2004, at 6:43, Dave Keck wrote:
Is there a way to restrict the scrolling increment of a NSScrollView -
when using the knob rather than the arrows - to a specified amount?
[...]
You can implement this method in the NSView embedded into the scroll
view:
- (NSRect)adjustScroll:(NSRect)proposedVisibleRect
Overridden by subclasses to modify proposedVisibleRect,
returning the altered rectangle. NSClipView invokes
this method to allow its document view to adjust its
position during scrolling. For example, a custom view
object that displays a table of data can adjust the
origin of proposedVisibleRect so rows or columns arent
cut off by the edge of the enclosing NSClipView.
NSViews implementation simply returns
proposedVisibleRect.
NSClipView only invokes this method during automatic or
user controlled scrolling. Its scrollToPoint: method
doesnt invoke this method, so you can still force a
scroll to an arbitrary point.
** 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.