Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSClipViewMBS class.

NSClipViewMBS.autoscroll(theEvent as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Scrolls the receiver proportionally to theEvent's distance outside of it.

theEvent's location should be expressed in the window's base coordinate system (which it normally is), not the receiving NSClipView's. Returns true if any scrolling is performed; otherwise returns false.

Never invoke this method directly; instead, the NSClipView's document view should repeatedly send itself autoscroll: messages when the cursor is dragged outside the NSClipView's frame during a modal event loop initiated by a mouse-down event. The NSView class implements autoscroll to forward the message to the receiver's superview; thus the message is ultimately forwarded to the NSClipView.

NSClipViewMBS.backgroundColor as NSColorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The color of the receiver's background.

(Read and Write computed property)

NSClipViewMBS.constrainScrollPoint(newOrigin as NSPointMBS) as NSPointMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a scroll point adjusted from proposedNewOrigin, if necessary, to guarantee the receiver will still lie within its document view.

For example, if proposedNewOrigin's y coordinate lies to the left of the document view's origin, then the y coordinate returned is set to that of the document view's origin.

NSClipViewMBS.Constructor

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

On success the handle property is not zero.

See also:

NSClipViewMBS.Constructor(Handle as Integer)

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

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

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

See also:

NSClipViewMBS.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 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new NSClipView with the given size and position.
Example
dim x as new NSClipViewMBS(0, 0, 100, 100)

On success the handle property is not zero.

See also:

NSClipViewMBS.copiesOnScroll as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether the receiver copies rendered images while scrolling.

If true, the receiver copies the existing rendered image to its new location while scrolling and only draws exposed portions of its document view. If false, the receiver always forces its document view to draw itself on scrolling.
(Read and Write computed property)

NSClipViewMBS.documentCursor as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The cursor object used over the receiver.

Value is an NSCursorMBS object.
(Read and Write computed property)

NSClipViewMBS.documentRect as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the rectangle defining the document view's frame, adjusted to the size of the receiver if the document view is smaller.

In other words, this rectangle is always at least as large as the receiver itself.

The document rectangle is used in conjunction with an NSClipView's bounds rectangle to determine values for the indicators of relative position and size between the NSClipView and its document view. For example, NSScrollView uses these rectangles to set the size and position of the knobs in its scrollers. When the document view is much larger than the NSClipView, the knob is small; when the document view is near the same size, the knob is large; and when the document view is the same size or smaller, there is no knob.

NSClipViewMBS.documentView as NSViewMBS

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

Gets or sets the receiver's document view. On set removes any previous document view, and sets the origin of the receiver's bounds rectangle to the origin of the new view's frame rectangle.

If the receiver is contained in an NSScrollView, you should set the NSScrollView DocumentView instead, so it can perform whatever updating it needs.

In the process of setting the document view, this method registers the receiver for the notifications NSViewFrameDidChangeNotification and NSViewBoundsDidChangeNotification, adjusts the key view loop to include the new document view, and updates a parent NSScrollView's display if needed using reflectScrolledClipView.
(Read and Write computed property)

NSClipViewMBS.documentVisibleRect as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the exposed rectangle of the receiver's document view, in the document view's own coordinate system.

Note that this rectangle doesn't reflect the effects of any clipping that may occur above the NSClipView itself. To get the portion of the document view that's guaranteed to be visible, send it a visibleRect message.

NSClipViewMBS.drawsBackground as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether the receiver draws its background color.

If your NSClipView is enclosed in an NSScrollView, you should set the DrawsBackground on the NSScrollView.
(Read and Write computed property)

NSClipViewMBS.reflectScrolledClipView(clipView as NSClipViewMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Adjusts the receiver's scrollers to reflect the size and positioning of its content view.

NSClipViewMBS.scrollClipView(clipview as NSClipViewMBS, toPoint as NSPointMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Notifies the superview of a clip view that the clip view needs to reset the origin of its bounds rectangle.

NSClipViewMBS.scrollToPoint(newOrigin as NSPointMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Changes the origin of the receiver's bounds rectangle to newOrigin.

NSClipViewMBS.viewBoundsChanged(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Handles an NSViewBoundsDidChangeNotification, passed in the aNotification argument, by updating a containing NSScrollView based on the new bounds.

NSClipViewMBS.viewFrameChanged(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Handles an NSViewFrameDidChangeNotification, passed in the aNotification argument, by updating a containing NSScrollView based on the new frame.

This event notifies you, that the control changed it's bounding frame, which is position and/or size.

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


The biggest plugin in space...