Platforms to show: All Mac Windows Linux Cross-Platform

NSScrollerMBS class

Super class: NSControlMBS

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa Controls MBS MacControls Plugin 8.4 Yes No No Yes, macOS only No
Function: An NSScroller object controls scrolling of a document view within an NSScrollView's clip view (or potentially another kind of container view).
It typically displays a pair of buttons that the user can click to scroll by a small amount (called a line increment or decrement) and Alt-click to scroll by a large amount (called a page increment or decrement), plus 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. You can configure whether an NSScroller object uses scroll buttons, but it always draws the knob when there's room for it.

Don't use an NSScroller when an NSSlider would be better. A slider 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.

You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSControlMBS class.

Feedback, Comments & Corrections

Knob style constants

Constant Value Description
NSScrollerKnobStyleDark 1 Specifies a dark knob.
This style is particularly good against a light background.
Available in Mac OS X v10.7 and later.
NSScrollerKnobStyleDefault 0 Specifies a dark knob with a light border.
This is the default style; it is good against any background.
Available in Mac OS X v10.7 and later.
NSScrollerKnobStyleLight 2 Specifies a light knob.
This style is particularly good against a dark background.
Available in Mac OS X v10.7 and later.

Scroller Style Constants

Constant Value Description
NSScrollerStyleLegacy 0 Specifies legacy-style scrollers as prior to Mac OS X v10.7.
Available in Mac OS X v10.7 and later.
NSScrollerStyleOverlay 1 Specifies overlay-style scrollers in Mac OS X v10.7 and later.
Available in Mac OS X v10.7 and later.

Super class NSControlMBS

Super class NSViewMBS

Window Order Constants

Constant Value Description
NSWindowAbove 1 Moves the window above the indicated window.
NSWindowBelow -1 Moves the window below the indicated window.
NSWindowOut 0 Moves the window off the screen.

Super class NSResponderMBS

Sub classes:

Some methods using this class:

Some properties using for this class:

Some examples which use this class:

Blog Entries

The items on this page are in the following plugins: MBS MacBase Plugin, MBS MacCocoa Plugin, MBS MacControls Plugin.

NSScreenMBS   -   NSScrollViewMBS

The biggest plugin in space...

MBS FileMaker Plugins