• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Setting a NSScrollView's Scroll Amount
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Setting a NSScrollView's Scroll Amount (From: Dave Keck <email@hidden>)

  • Prev by Date: Problem saving movie
  • Next by Date: Re: returning nil on initialization
  • Previous by thread: Setting a NSScrollView's Scroll Amount
  • Next by thread: Using IP or hostname for NSConnections rootProxyForConnectionWithRegisteredName:host:
  • Index(es):
    • Date
    • Thread