An object that controls scrolling of a document view within a scroll view or other type of container view.
SDK
- macOS 10.0+
Framework
- App
Kit
Declaration
@interface NSScroller : NSControl
Overview
A scroller displays a slot containing a knob that the user can drag directly to the desired location. The knob indicates both the position within the document view and—by varying in size within the slot—the amount visible relative to the size of the document view.
Typically, you don’t need to program with scrollers; instead, you configure them with an NSScroll
object in a Nib file.
Don’t use an scroller when a slider would be more appropriate. An NSSlider
object represents a range of values for something in the application and lets the user choose a setting. A scroller represents the relative position of the visible portion of a view and lets the user choose which portion to view.