Platforms to show: All Mac Windows Linux Cross-Platform

NSImageViewMBS class

Super class: NSControlMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa Controls MBS MacControls Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
An NSImageView object displays a single image from an NSImage object in a frame and can optionally allow a user to drag an image to it.
Example
ImageWell1.NSImageViewMBS.alphaValue = 0.5

You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSControlMBS class.

Constants

Constant Value Description
NSImageAlignBottom 5 One of the constants to specify the location of the image in the frame using the imageAlignment property. Align the image with the bottom edge of the cell.
NSImageAlignBottomLeft 6 One of the constants to specify the location of the image in the frame using the imageAlignment property. Align the image with the bottom and left edges of the cell.
NSImageAlignBottomRight 7 One of the constants to specify the location of the image in the frame using the imageAlignment property. Align the image with the bottom and right edges of the cell.
NSImageAlignCenter 0 One of the constants to specify the location of the image in the frame using the imageAlignment property. Center the image in the cell.
NSImageAlignLeft 4 One of the constants to specify the location of the image in the frame using the imageAlignment property. Align the image with the left edge of the cell.
NSImageAlignRight 8 One of the constants to specify the location of the image in the frame using the imageAlignment property. Position the image along the right edge of the cell.
NSImageAlignTop 1 One of the constants to specify the location of the image in the frame using the imageAlignment property. Position the image along the top edge of the cell.
NSImageAlignTopLeft 2 One of the constants to specify the location of the image in the frame using the imageAlignment property. Align the image with the top and left edges of the cell.
NSImageAlignTopRight 3 One of the constants to specify the location of the image in the frame using the imageAlignment property. Align the image with the top and right edges of the cell.
NSImageFrameButton 4 One of the frame constants for the imageFrameStyle property. A convex bezel that makes the image stand out in relief, like a button
NSImageFrameGrayBezel 2 One of the frame constants for the imageFrameStyle property. A gray, concave bezel that makes the image look sunken
NSImageFrameGroove 3 One of the frame constants for the imageFrameStyle property. A thin groove that looks etched around the image
Example
NSImageFrameNone 0 One of the frame constants for the imageFrameStyle property. An invisible frame
NSImageFramePhoto 1 One of the frame constants for the imageFrameStyle property. A thin black outline and a dropped shadow

Scale Methods

Constant Value Description
NSImageScaleAxesIndependently 1 Scale each dimension to exactly fit destination. This setting does not preserve the aspect ratio of the image.
NSImageScaleNone 2 Do not scale the image.
NSImageScaleProportionallyDown 0 If it is too large for the destination, scale the image down while preserving the aspect ratio.
NSImageScaleProportionallyUpOrDown 3 Scale the image to its maximum possible dimensions while both staying within the destination area and preserving its aspect ratio.
NSScaleNone 2 Do not scale the image.
NSScaleProportionally 0 If it is too large for the destination, scale the image down while preserving the aspect ratio.
NSScaleToFit 1 Scale each dimension to exactly fit destination. This setting does not preserve the aspect ratio of the image.

Super class NSControlMBS

Constants

Constant Value Description
ControlSizeLarge 3 One of the constants to specify a cell’s size. A size larger than the default control size.
ControlSizeMini 2 One of the constants to specify a cell’s size. The smallest control size.
ControlSizeRegular 0 One of the constants to specify a cell’s size. The default control size.
ControlSizeSmall 1 One of the constants to specify a cell’s size. A size smaller than the default control size. more

Super class NSViewMBS

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

This class has no sub classes.

Some methods using this class:

Some properties using for this class:

Some examples using this class:

Blog Entries

Release notes


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


NSImageSymbolConfigurationMBS   -   NSIndexPathMBS


💬 Ask a question or report a problem
The biggest plugin in space...