Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSScrollerMBS class.

NSScrollerMBS.arrowsPosition as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacControls Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The location of the scroll buttons within the receiver.

Can be NSScrollerArrowsMaxEnd, NSScrollerArrowsMinEnd, NSScrollerArrowsDefaultSetting or NSScrollerArrowsNone.
(Read and Write computed property)

NSScrollerMBS.checkSpaceForParts

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Checks to see if there is enough room in the receiver to display the knob and buttons.

usableParts returns the state calculated by this method. You should never need to invoke this method; it's invoked automatically whenever the NSScroller's size changes.

NSScrollerMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new scroller with size 100/100 and position 0/0
Example
dim t as new NSScrollerMBS

On success the handle property is not zero.

See also:

NSScrollerMBS.Constructor(Handle as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates an object based on the given NSScroller handle.
Example
dim t as new NSScrollerMBS(0, 0, 100, 100)
dim v as new NSScrollerMBS(t.handle)

MsgBox str(v.Bounds.Width)+" x "+str(v.Bounds.Height)

The handle is casted to a NSScroller and the plugin retains this handle.

See also:

NSScrollerMBS.Constructor(left as Double, top as Double, width as Double, height as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new scroller with the given size and position.
Example
dim x as new NSScrollerMBS(0, 0, 100, 100)

On success the handle property is not zero.

See also:

NSScrollerMBS.controlSize as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacControls Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The size of the receiver.

Can be NSRegularControlSize, NSMiniControlSize or NSSmallControlSize.
(Read and Write computed property)

NSScrollerMBS.controlTint as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacControls Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The receiver's control tint.

Can be NSGraphiteControlTint, NSBlueControlTint, NSClearControlTint or NSDefaultControlTint.
(Read and Write computed property)

NSScrollerMBS.drawArrow(Arrow as Integer, highlight as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Draws the scroll button indicated by arrow, which is either NSScrollerIncrementArrow (the down or right scroll button) or NSScrollerDecrementArrow (up or left).

If flag is true, the button is drawn highlighted; otherwise it's drawn normally. You should never need to invoke this method directly, but may wish to override it to customize the appearance of scroll buttons.
Calling this method on CustomNSScrollerMBS objects does not trigger the drawArrow event.

NSScrollerMBS.drawKnob

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Draws the knob.

You should never need to invoke this method directly, but may wish to override it to customize the appearance of the knob.
Calling this method on CustomNSScrollerMBS objects does not trigger the drawKnob event.

NSScrollerMBS.drawKnobSlotInRect(slotRect as NSRectMBS, highlight as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Draws the knob slow in the rectangle.

Calling this method on CustomNSScrollerMBS objects does not trigger the drawKnobSlotInRect event.

NSScrollerMBS.drawParts

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Caches images for the scroll buttons and knob.

It's invoked only once when the NSScroller is created. You may want to override this method if you alter the look of the NSScroller, but you should never invoke it directly.

Calling this method on CustomNSScrollerMBS objects does not trigger the drawParts event.

NSScrollerMBS.highlight(flag as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Highlights or unhighlights the scroll button the user clicked.

The receiver invokes this method while tracking the mouse; you should not invoke it directly. If flag is true, the appropriate part is drawn highlighted; otherwise it's drawn normally.

NSScrollerMBS.hitPart as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a part code indicating the manner in which the scrolling should be performed.

This method is typically invoked by an NSScrollView to determine how to scroll its document view when it receives an action message from the NSScroller.

NSScrollerMBS.knobProportion as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacControls Plugin 9.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The portion of the knob slot the knob should fill, as a floating-point value from 0.0 (minimal size) to 1.0 (fills the slot).

Can be set on Mac OS X 10.5 directly.
(Read and Write computed property)

NSScrollerMBS.knobStyle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The knob style.

The value of this property does not affect legacy scrollers. NSScrollerKnobStyleDefault is appropriate for a wide range of content, but in some cases choosing an alternative knob style may enhance visibility of the scroller knob atop some kinds of content.

Available in Mac OS X v10.7 and later.

use constants: NSScrollerKnobStyleDefault, NSScrollerKnobStyleDark or NSScrollerKnobStyleLight.
(Read and Write computed property)

Some examples using this property:

NSScrollerMBS.rectForPart(part as Integer) as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the rectangle occupied by aPart, which for this method is interpreted literally rather than as an indicator of scrolling direction.

Note the interpretations of NSScrollerDecrementPage and NSScrollerIncrementPage. The actual part of an NSScroller that causes page-by-page scrolling varies, so as a convenience these part codes refer to useful parts different from the scroll buttons.

Returns NSRectMBS.Zero if the part requested isn't present on the receiver.

NSScrollerMBS.scrollerStyle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The scroller style.

or a scroller that's managed by an NSScrollView object, the setter is automatically invoked by the scroll view with the appropriate setting, according to the user's Appearance preference settings and possibly what pointing device(s) are present (see preferredScrollerStyle).
Available in Mac OS X v10.7 and later.
(Read and Write computed property)

NSScrollerMBS.setFloatValue(aFloat as Double, proportion as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the position of the knob to aFloat, which is a value from 0.0 (indicating the top or left end) to 1.0 (the bottom or right end).

Also sets the proportion of the knob slot filled by the knob to knobProp, also a value from 0.0 (minimal size) to 1.0 (fills the slot).

Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.5.

NSScrollerMBS.testPart(p as NSPointMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the part that would be hit by a mouse-down event at p (expressed in the window's coordinate system).

Note the interpretations of NSScrollerDecrementPage and NSScrollerIncrementPage. The actual part of an NSScroller that causes page-by-page scrolling varies, so as a convenience these part codes refer to useful parts different from the scroll buttons.

NSScrollerMBS.trackKnob(theEvent as NSEventMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tracks the knob and sends action messages to the receiver's target.

This method is invoked automatically when the receiver receives theEvent mouse-down event in the knob; you should not invoke it directly.

NSScrollerMBS.trackScrollButtons(theEvent as NSEventMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Tracks the scroll buttons and sends action messages to the receiver's target.

This method is invoked automatically when the receiver receives theEvent mouse-down event in a scroll button; you should not invoke this method directly.

NSScrollerMBS.usableParts as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a value indicating which parts of the receiver are displayed and usable.

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


The biggest plugin in space...