Platforms to show: All Mac Windows Linux Cross-Platform

NSCollectionViewMBS class

Super class: NSViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Function: An ordered collection of data items displayed in a customizable layout.
Notes:
The simplest type of collection view displays its items in a grid, but you can define layouts to arrange items however you like. For example, you might create a layout where items are arranged in a circle. You can also change layouts dynamically at runtime whenever you need to present items differently.

See also:
https://developer.apple.com/documentation/appkit/views_and_controls/collection_view
https://developer.apple.com/documentation/appkit/nscollectionview
Subclass of the NSViewMBS class.

Feedback, Comments & Corrections

Scroll Position

Constant Value Description
NSCollectionViewScrollPositionBottom 4 Scroll so that the bottom edge of the bounding box is adjacent to the bottom of the collection view’s bounds.
This option must not be combined with the NSCollectionViewScrollPositionTop, NSCollectionViewScrollPositionCenteredVertically, or NSCollectionViewScrollPositionNearestHorizontalEdge options, but may be combined with other options.
NSCollectionViewScrollPositionCenteredHorizontally 16 Scroll so that the selected items’ bounding box is centered horizontally in the collection view’s bounds.
This option must not be combined with the NSCollectionViewScrollPositionLeft, NSCollectionViewScrollPositionRight, NSCollectionViewScrollPositionLeadingEdge, NSCollectionViewScrollPositionTrailingEdge, or NSCollectionViewScrollPositionNearestVerticalEdge options, but may be combined with other options.
NSCollectionViewScrollPositionCenteredVertically 2 Scroll so that the bounding box of the selected items is centered vertically in the collection view’s bounds.
This option must not be combined with the NSCollectionViewScrollPositionTop, NSCollectionViewScrollPositionBottom, or NSCollectionViewScrollPositionNearestHorizontalEdge options, but may be combined with other options.
NSCollectionViewScrollPositionLeadingEdge 64 Scroll so that the leading edge of the selected items’ bounding box is adjacent to the leading edge of the collection view’s bounds.
Use this option to support both left-to-right and right-to-left layouts appropriately. This option must not be combined with the NSCollectionViewScrollPositionLeft, NSCollectionViewScrollPositionCenteredHorizontally, NSCollectionViewScrollPositionRight, NSCollectionViewScrollPositionTrailingEdge, or NSCollectionViewScrollPositionNearestVerticalEdge options, but may be combined with other options.
NSCollectionViewScrollPositionLeft 8 Scroll so that the left edge of the selected items’ bounding box is adjacent to the left edge of the collection view’s bounds.
This option must not be combined with the NSCollectionViewScrollPositionCenteredHorizontally, NSCollectionViewScrollPositionRight, NSCollectionViewScrollPositionLeadingEdge, NSCollectionViewScrollPositionTrailingEdge, or NSCollectionViewScrollPositionNearestVerticalEdge options, but may be combined with other options.
NSCollectionViewScrollPositionNearestHorizontalEdge 512 Scroll so that the bounding box is adjacent to the nearest edge (top or bottom) of the collection view.
This option must not be combined with the NSCollectionViewScrollPositionTop, NSCollectionViewScrollPositionCenteredVertically, or NSCollectionViewScrollPositionBottom options, but may be combined with other options.
NSCollectionViewScrollPositionNearestVerticalEdge 256 Scroll so that the bounding box is adjacent to the nearest edge (leading or trailing) of the collection view.
Use this option to support both left-to-right and right-to-left layouts appropriately. This option must not be combined with the NSCollectionViewScrollPositionLeft, NSCollectionViewScrollPositionCenteredHorizontally, NSCollectionViewScrollPositionRight, NSCollectionViewScrollPositionLeadingEdge, or NSCollectionViewScrollPositionTrailingEdge options, but may be combined with other options.
NSCollectionViewScrollPositionNone 0 Do not scroll.
NSCollectionViewScrollPositionRight 32 Scroll so that the right edge of the selected items’ bounding box is adjacent to the right edge of the collection view’s bounds.
This option must not be combined with the NSCollectionViewScrollPositionLeft, NSCollectionViewScrollPositionCenteredHorizontally, NSCollectionViewScrollPositionLeadingEdge, NSCollectionViewScrollPositionTrailingEdge, or NSCollectionViewScrollPositionNearestVerticalEdge options, but may be combined with other options.
NSCollectionViewScrollPositionTop 1 Scroll so that the top edge of the selected items’ bounding box is adjacent to the top edge of the collection view’s bounds.
This option must not be combined with the NSCollectionViewScrollPositionCenteredVertically, NSCollectionViewScrollPositionBottom, and NSCollectionViewScrollPositionNearestHorizontalEdge options, but may be combined with other options.
NSCollectionViewScrollPositionTrailingEdge 128 Scroll so that the trailing edge of the selected items’ bounding box is adjacent to the trailing edge of the collection view’s bounds.
Use this option to support both left-to-right and right-to-left layouts appropriately. This option must not be combined with the NSCollectionViewScrollPositionLeft, NSCollectionViewScrollPositionCenteredHorizontally, NSCollectionViewScrollPositionRight, NSCollectionViewScrollPositionLeadingEdge, or NSCollectionViewScrollPositionNearestVerticalEdge options, but may be combined with other options.

Super class NSViewMBS

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

Some examples using this class:

Blog Entries


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


NSCollectionViewLayoutMBS   -   NSCollectionViewSectionHeaderViewMBS

The biggest plugin in space...




Links
MBS FileMaker blog

Start Chat