Platforms to show: All Mac Windows Linux Cross-Platform

NSViewMBS class

Super class: NSResponderMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The Cocoa class for a view.

To draw into a NSView, use either CustomNSViewMBS class with drawRect event or NSGraphicsMBS class.
Subclass of the NSResponderMBS class.

Constants

Constant Value Description
NSBezelBorder 2 One of the constants to specify the type of a view's border. A concave border that makes the view look sunken.
NSFocusRingTypeDefault 0 One of the constants for the focusringtype property. The default focus ring type for NSView or NSCell.
NSFocusRingTypeExterior 2 One of the constants for the focusringtype property. The standard Aqua focus ring.
NSFocusRingTypeNone 1 One of the constants for the focusringtype property. No focus ring. If you set the focus ring type to this value, NSView and NSCell will not draw any focus ring.
NSGrooveBorder 3 One of the constants to specify the type of a view's border. A thin border that looks etched around the image.
NSLineBorder 1 One of the constants to specify the type of a view's border. A black line border around the view.
NSNoBorder 0 One of the constants to specify the type of a view's border. No border.
NSViewHeightSizable 16 One of the constants for the autoresizingMask property. The receiver's height is flexible.
NSViewLayerContentsRedrawBeforeViewResize 3 One of the view layer content redraw policy constants.
NSViewLayerContentsRedrawDuringViewResize 2 One of the view layer content redraw policy constants.
NSViewLayerContentsRedrawNever 0 One of the view layer content redraw policy constants.
NSViewLayerContentsRedrawOnSetNeedsDisplay 1 One of the view layer content redraw policy constants.
NSViewMaxXMargin 4 One of the constants for the autoresizingMask property. The right margin between the receiver and its superview is flexible.
NSViewMaxYMargin 32 One of the constants for the autoresizingMask property. The top margin between the receiver and its superview is flexible.
NSViewMinXMargin 1 One of the constants for the autoresizingMask property. The left margin between the receiver and its superview is flexible.
NSViewMinYMargin 8 One of the constants for the autoresizingMask property. The bottom margin between the receiver and its superview is flexible.
NSViewNotSizable 0 One of the constants for the autoresizingMask property. The receiver cannot be resized.
NSViewWidthSizable 2 One of the constants for the autoresizingMask property. The receiver's width is flexible.

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 events using this class:

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes

  • Version 23.4
    • Added clipsToBounds property to NSViewMBS class.
  • Version 22.2
    • Added Screenshot function for NSViewMBS class to render view into picture.
  • Version 21.4
    • Added userInteractionEnabled property to NSViewMBS class for iOS.
    • Improved NSViewMBS to work on iOS, internally with UIView.
  • Version 20.3
    • Added flipped parameter to RenderImage method in NSViewMBS class.
  • Version 18.4
  • Version 18.0
  • Version 17.5
    • Changed NSViewMBS constructors to raise exception if called on Windows.

The items on this page are in the following plugins: MBS AVFoundation Plugin, MBS Mac64bit Plugin, MBS MacBase Plugin, MBS MacCocoa Plugin, MBS MacControls Plugin, MBS MacExtras Plugin, MBS MacFrameworks Plugin, MBS PDFKit Plugin.


NSViewControllerMBS   -   NSViewTooltipMBS


The biggest plugin in space...