Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSSliderMBS class.

NSSliderMBS.acceptsFirstMouse(event as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Overridden by subclasses to return true if the receiver should be sent a mouseDown event for an initial mouse-down event, false if not.

The receiver can either return a value unconditionally or use the location of event e to determine whether or not it wants the event. The default implementation ignores the event and returns false.

Implement this event in a subclass to allow instances to respond to click-through. This allows the user to click on a view in an inactive window, activating the view with one click, instead of clicking first to make the window active and then clicking the view. Most view objects refuse a click-through attempt, so the event simply activates the window. Many control objects, however, such as instances of NSButton and NSSlider, do accept them, so the user can immediately manipulate the control without having to release the mouse button.

NSSliderMBS.closestTickMarkValueToValue(value as Double) 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
Returns the value of the tick mark closest to the specified value.

NSSliderMBS.Constructor

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

On success the handle property is not zero.

See also:

NSSliderMBS.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 NSSlider handle.
Example
dim t as new NSSliderMBS(0, 0, 100, 100)
dim v as new NSSliderMBS(t.handle)

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

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

See also:

NSSliderMBS.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 slider with the given size and position.
Example
dim x as new NSSliderMBS(0, 0, 100, 100)

On success the handle property is not zero.

See also:

NSSliderMBS.indexOfTickMarkAtPoint(p as NSPointMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the index of the tick mark closest to the location of the receiver represented by the given point.

Returns the index of the tick mark closest to the location specified by point. If point is not within the bounding rectangle (plus an extra pixel of space) of any tick mark, the method returns NSNotFound.
In its implementation of this method, the receiving NSSlider instance simply invokes the method of the same name of its NSSliderCell instance. This method invokes rectOfTickMarkAtIndex: for each tick mark on the slider until it finds a tick mark containing the point.

See also:

NSSliderMBS.indexOfTickMarkAtPoint(x as Double, y as Double) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the index of the tick mark closest to the location of the receiver represented by the given point.

The index of the tick mark closest to the location specified by point. If point is not within the bounding rectangle (plus an extra pixel of space) of any tick mark, the method returns NSNotFound (&h7fffffff).

See also:

NSSliderMBS.rectOfTickMarkAtIndex(index as Integer) as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the bounding rectangle of the tick mark at the given index.

If no tick mark is associated with index, the method raises NSRangeException.

NSSliderMBS.tickMarkValueAtIndex(index as Integer) 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
Returns the receiver's value represented by the tick mark at the specified index.

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


The biggest plugin in space...