Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSViewMBS class.

NSViewMBS.acceptsTouchEvents as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether the view will accept touch events.

Available in Mac OS X v10.6 and later.
(Read and Write property)

NSViewMBS.allowsVibrancy as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 14.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
allowsVibrancy is queried when a vibrant appearance is used on a view hierarchy.

When allowsVibrancy returns YES, the view will have an appropriate measure taken to ensure it is vibrant on top of its given material.
Specific subclasses, such as NSControl, will answer this question based on the artwork they draw for a given appearance.
(Read only property)

NSViewMBS.alphaValue as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
the opacity of the view.
Example
// makes a checkbox half transparent on Cocoa target:
CheckBox1.NSViewMBS.alphaValue = 0.5

This method returns the value of the opacity property of the view's layer. Possible values are between 0.0 (transparent) and 1.0 (opaque). The default is 1.0.

Sending this message to a view that is not managing a Core Animation layer causes an exception.
(Read and Write property)

NSViewMBS.autoresizesSubviews as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
True if the receiver automatically resizes its subviews using resizeSubviewsWithOldSize whenever its frame size changes, false otherwise.

(Read and Write property)

Some examples using this property:

NSViewMBS.autoresizingMask as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The receiver's autoresizing mask, which determines how it's resized by the resizeWithOldSuperviewSize method.

If the autoresizing mask is equal to NSViewNotSizable (that is, if none of the options are set), then the receiver doesn't resize at all in resizeWithOldSuperviewSize.

NSViewNotSizable = 0The receiver cannot be resized.
NSViewMinXMargin = 1The left margin between the receiver and its superview is flexible.
NSViewWidthSizable = 2The receiver's width is flexible.
NSViewMaxXMargin = 4The right margin between the receiver and its superview is flexible.
NSViewMinYMargin = 8The bottom margin between the receiver and its superview is flexible.
NSViewHeightSizable = 16The receiver's height is flexible.
NSViewMaxYMargin = 32The top margin between the receiver and its superview is flexible.
(Read and Write property)

NSViewMBS.bounds as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the receiver's bounds rectangle, which expresses its location and size in its own coordinate system.
Example
Var n as new NSProgressIndicatorMBS
n.sizeToFit

MsgBox n.bounds.String

The bounds rectangle may be rotated; use the boundsRotation method to check this.
(Read and Write property)

NSViewMBS.boundsRotation as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The angle, in degrees, of the view's bounds rectangle relative to its frame rectangle.

(Read and Write property)

NSViewMBS.canBecomeKeyView as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns whether the receiver can become key view.

Returns true if the receiver can become key view, false otherwise.
(Read only property)

NSViewMBS.canDraw as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns true if drawing commands will produce any result, false otherwise.

Use this method when invoking a draw method directly along with lockFocus and unlockFocus, bypassing the display... methods (which test drawing ability and perform locking for you). If this method returns false, you shouldn't invoke lockFocus or perform any drawing.

A view object can draw on-screen if it is not hidden, it is attached to a view hierarchy in a window (NSWindow), and the window has a corresponding window device. A view object can draw during printing if it is a descendant of the view being printed.

To draw into a NSView, use either CustomNSViewMBS class with drawRect event or NSGraphicsMBS class.
(Read only property)

NSViewMBS.canDrawConcurrently as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether the view's drawRect: method can be invoked on a background thread.

Available in Mac OS X v10.6 and later.
(Read and Write property)

NSViewMBS.className as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.7 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The name of this NSView class.
Example
// shows RBNSButton
MsgBox checkbox1.NSViewMBS.className

(Read only property)

NSViewMBS.classPath as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 10.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The path of this NSView class.
Example
MsgBox TextArea1.NSViewMBS.classPath
// shows "RBNSScrollView:NSScrollView:NSView:NSResponder:NSObject"

Useful for debugging to know what super classes the view has.
(Read only property)

NSViewMBS.clipsToBounds as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 23.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value that determines whether subviews are confined to the bounds of the view.

Setting this value to true causes subviews to be clipped to the bounds of the view. If set to false, subviews whose frames extend beyond the visible bounds of the view aren’t clipped.
The default value is false. Some subclasses of UIView, like UIScrollView, override the default value to true.
(Read and Write property)

NSViewMBS.focusRingType as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The type of focus ring to be drawn around the receiver.

This method only sets the desired focus ring type and does not cause the view to draw the actual focus ring. You are responsible for drawing the focus ring in your view's drawRect method whenever your view is made the first responder.

possible values:
NSFocusRingTypeDefault0
NSFocusRingTypeNone1
NSFocusRingTypeExterior2
(Read and Write property)

NSViewMBS.frame as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the frame size and position of the view.
Example
Var n as new NSProgressIndicatorMBS
n.sizeToFit

MsgBox n.frame.String

(Read and Write property)

NSViewMBS.frameCenterRotation as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The receiver's rotation about the layer's position.

If the application has altered the layer's anchorPoint property, the behavior is undefined. Sending this message to a view that is not managing a Core Animation layer causes an exception.

Available in Mac OS X v10.5 and later.
(Read and Write property)

NSViewMBS.frameHeight as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.7 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The height of the view frame.
Example
Var n as new NSProgressIndicatorMBS
MsgBox str(n.frameHeight)

This is a convenience property which calls the frame function to get the current rectangle, changes the value and sets the frame to the new rectangle.
(Read and Write property)

Some examples using this property:

NSViewMBS.frameLeft as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.7 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The left position of the view frame.
Example
Var n as new NSProgressIndicatorMBS
MsgBox str(n.frameLeft)

This is a convenience property which calls the frame function to get the current rectangle, changes the value and sets the frame to the new rectangle.
(Read and Write property)

NSViewMBS.frameRotation as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The angle, in degrees, of the view's frame relative to its superview's coordinate system.

Var n as new NSProgressIndicatorMBS
n.frameRotation=10
MsgBox str(n.frameRotation)
(Read and Write property)

NSViewMBS.frameTop as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.7 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The top position of the view frame.
Example
Var n as new NSProgressIndicatorMBS
MsgBox str(n.frameTop)

This is a convenience property which calls the frame function to get the current rectangle, changes the value and sets the frame to the new rectangle.
(Read and Write property)

Some examples using this property:

NSViewMBS.frameWidth as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.7 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The width of the view frame.
Example
Var n as new NSProgressIndicatorMBS
MsgBox str(n.frameWidth)

This is a convenience property which calls the frame function to get the current rectangle, changes the value and sets the frame to the new rectangle.
(Read and Write property)

Some examples using this property:

NSViewMBS.identifier as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A string that identifies this user interface item.

It should be set to a unique value on NSViews when they are intended to be used inside a view-based NSTableView. Identifiers should be unique per-window. For programmatically created user interface items, you would typically set this value in code after creating a control but before adding it to a window. You may also want to set an identifier on a window, after creating it programmatically, to identify the window easily when it is reopened. You should not change the identifier after a control is added to a window. Identifiers beginning with an underscore are reserved for the system. In framework classes that implement this protocol, the accessor methods are not intended to be overridden.

To help avoid collision of identifiers, it is recommended that identifiers use the same prefix as is used for the framework or application. For example, identifiers for standard AppKit interface items, such as the open panel, will begin with "NS".

The slash '/', backslash '\', and colon ':' characters are reserved and should not be used in identifiers.
(Read and Write property)

NSViewMBS.isFlipped as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
True if the nsview uses flipped drawing coordinates or false if it uses native coordinates.

(Read only property)

NSViewMBS.isHidden as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether the receiver is marked as hidden.

(Read and Write property)

NSViewMBS.isHiddenOrHasHiddenAncestor as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
True if the nsview is marked as hidden or has an ancestor in the view hierarchy that is marked as hidden; returns false otherwise.

(Read only property)

NSViewMBS.isOpaque as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Overridden by subclasses to return true if the view is opaque, false otherwise.

(Read only property)

NSViewMBS.isRotatedFromBase as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
True if the nsview or any of its ancestors has ever set a FrameRotation or BoundsRotation properties; otherwise returns false.

(Read only property)

NSViewMBS.isRotatedOrScaledFromBase as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
True if the nsview or any of its ancestors has ever had a nonzero frame or bounds rotation, or has been scaled from the window's base coordinate system; otherwise returns false.

The intent of this information is to optimize drawing and coordinate calculation, not necessarily to reflect the exact state of the receiver's coordinate system, so it may not reflect the actual rotation or scaling. For example, if an NSView object is rotated to 45 degrees and later back to 0, this method still returns true.
(Read only property)

NSViewMBS.layer as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns or sets the Core Animation layer that the receiver uses as its backing store.

Value is a CALayerMBS object.
Available in OS X v10.5 and later.
(Read and Write property)

NSViewMBS.layerUsesCoreImageFilters as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 18.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean value indicating whether the view’s layer uses Core Image filters and needs in-process rendering.

If your view uses a custom layer and you assigned Core Image to that layer directly, you must set this property to YES to let AppKit know of that fact. In macOS 10.9 and later, AppKit prefers to render layer trees out-of-process but cannot do so if any layers have Core Image filters attached to them. Specifying true for property lets AppKit know that it must move rendering of the layer hierarchy back into your app’s process. If the value of this property is false, adding a filter to the view’s layer triggers an exception.

You do not need to modify this property if you assigned the filters using the backgroundFilters, compositingFilter, or contentFilters properties of the view. Those methods automatically let AppKit know that it needs to render the layer hierarchy in-process. Set it only if you set the filters on the layer directly.
(Read and Write property)

NSViewMBS.needsDisplay as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
whether the view needs to be displayed.

(Read and Write property)

NSViewMBS.nextKeyView as NSViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The view object following the receiver in the key view loop.

Returns the view object following the receiver in the key view loop, or nil if there is none.
On setting inserts a specified view object after the receiver in the key view loop of the receiver's window.
This view should, if possible, be made first responder when the user navigates forward from the receiver using keyboard interface control.
Returns nil on any error.
(Read and Write property)

NSViewMBS.opaqueAncestor as NSViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the receiver's closest opaque ancestor (including the receiver itself).

(Read only property)

NSViewMBS.RetainCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The retain count for the NSView object.

Useful for debugging. Should always be > 0.
(Read only property)

NSViewMBS.superview as NSViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the receiver's superview, or nil if it has none.

(Read only property)

Some examples using this property:

NSViewMBS.toolTip as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The tooltip text for this view.
Example
Var n as new NSProgressIndicatorMBS
n.toolTip = "Hello"
MsgBox n.toolTip

(Read and Write property)

NSViewMBS.userInteractionEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 21.4 ✅ Yes ❌ No ❌ No ✅ Yes iOS only
A Boolean value that determines whether user events are ignored and removed from the event queue.

When set to false, touch, press, keyboard, and focus events intended for the view are ignored and removed from the event queue. When set to YES, events are delivered to the view normally. The default value of this property is true.

During an animation, user interactions are temporarily disabled for all views involved in the animation, regardless of the value in this property. You can disable this behavior by specifying the UIViewAnimationOptionAllowUserInteraction option when configuring the animation.
(Read and Write property)

NSViewMBS.visibleRect as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the portion of the receiver not clipped by its superviews.

Visibility for this method is defined quite simply and doesn't account for whether other NSView objects (or windows) overlap the receiver or whether the receiver has a window at all. This method returns an empty rectangle if the receiver is effectively hidden.

During a printing operation the visible rectangle is further clipped to the page being imaged.
(Read only property)

Some examples using this property:

NSViewMBS.wantsDefaultClipping as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns whether the Application Kit's default clipping provided to drawRect implementations is in effect.

Subclasses may override this method to return false if they want to suppress the default clipping. They may want to do this in situations where drawing performance is critical to avoid the cost of setting up, enforcing, and cleaning up the clip path

A view that overrides this method to refuse the default clipping must either set up whatever clipping it requires or constrain its drawing exactly to the list of rectangles returned by getRectsBeingDrawn. Failing to do so could result in corruption of other drawing in the view's window.
(Read only property)

NSViewMBS.wantsLayer as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether the receiver and its subviews use a Core Animation layer as a backing store.

True if the view and its subviews should use a Core Animation layer as its backing store, otherwise false.

Requires Mac OS X 10.5.
(Read and Write property)

Some examples using this property:

NSViewMBS.wantsRestingTouches as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether the view wants resting touches.

A resting touch occurs when a user rests their thumb on a device (for example, the glass trackpad of a MacBook).

By default, these touches are not delivered and are not included in the event's set of touches. Touches may transition in and out of resting at any time. Unless the view wants restingTouches, began / ended events are simulated as touches transition from resting to active and vice versa.

In general resting touches should be ignored.

Available in Mac OS X v10.6 and later.
(Read and Write property)

NSViewMBS.window as NSWindowMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the receiver's window object, or nil if it has none.

(Read only property)

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


The biggest plugin in space...