Platforms to show: All Mac Windows Linux Cross-Platform
NSCollectionViewControlMBS control
See also desktop control: DesktopNSCollectionViewControlMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
control | Cocoa Collection View | MBS MacControls Plugin | 21.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Requires macOS 10.11 or newer!
See also:
https://developer.apple.com/documentation/appkit/views_and_controls/collection_view
https://developer.apple.com/documentation/appkit/nscollectionview
https://developer.apple.com/documentation/appkit/nscollectionviewdatasource
https://developer.apple.com/documentation/appkit/nscollectionviewdelegate
- 60 events
- event acceptDrop(draggingInfo as NSDraggingInfoMBS, indexPath as NSIndexPathMBS, dropOperation as Integer) as Integer
- event BoundsChanged
- event cancelPrefetchingForItems(indexPaths() as NSIndexPathMBS)
- event canDragItems(indexPaths() as NSIndexPathMBS, NSEvent as NSEventMBS) as Boolean
- event Close
- event Closing
- event ConstructContextualMenu(base as MenuItem, x as Integer, y as Integer) as Boolean
- event ContextualMenuAction(hitItem as MenuItem) as Boolean
- event didChangeItems(indexPaths() as NSIndexPathMBS, highlightState as Integer)
- event didCloseContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
- event didDeselectItems(indexPaths() as NSIndexPathMBS)
- event didEndDisplayingItem(item as NSCollectionViewItemMBS, indexPath as NSIndexPathMBS)
- event didEndDisplayingSupplementaryView(view as NSViewMBS, elementKind as String, indexPath as NSIndexPathMBS)
- event didSelectItems(indexPaths() as NSIndexPathMBS)
- event draggingImageForItems(indexPaths() as NSIndexPathMBS, NSEvent as NSEventMBS, byref dragImageOffset as NSPointMBS) as NSImageMBS
- event draggingSessionEnded(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, dragOperation as Integer)
- event draggingSessionWillBegin(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, indexPaths() as NSIndexPathMBS)
- event EnableMenuItems
- event FocusLost
- event FocusReceived
- event FrameChanged
- event GotFocus
- event insetForSectionAtIndex(layout as NSCollectionViewLayoutMBS, section as Integer) as NSEdgeInsetsMBS
- event ItemApplyLayoutAttributes(item as NSCollectionViewItemMBS, layoutAttributes as NSCollectionViewLayoutAttributesMBS)
- event ItemDidTransition(item as NSCollectionViewItemMBS, oldLayout as NSCollectionViewLayoutMBS, newLayout as NSCollectionViewLayoutMBS)
- event itemForRepresentedObject(indexPath as NSIndexPathMBS) as NSCollectionViewItemMBS
- event ItemPreferredLayoutAttributesFittingAttributes(item as NSCollectionViewItemMBS, layoutAttributes as NSCollectionViewLayoutAttributesMBS) as NSCollectionViewLayoutAttributesMBS
- event ItemPrepareForReuse(item as NSCollectionViewItemMBS)
- event ItemWillTransition(item as NSCollectionViewItemMBS, oldLayout as NSCollectionViewLayoutMBS, newLayout as NSCollectionViewLayoutMBS)
- event LostFocus
- event MenuBarSelected
- event minimumInteritemSpacingForSectionAtIndex(layout as NSCollectionViewLayoutMBS, section as Integer) as double
- event minimumLineSpacingForSectionAtIndex(layout as NSCollectionViewLayoutMBS, section as Integer) as double
- event MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
- event MouseDrag(x as Integer, y as Integer)
- event MouseUp(x As Integer, y As Integer)
- event namesOfPromisedFilesDroppedAtDestination(dropURL as String, indexPaths() as NSIndexPathMBS) as String()
- event numberOfItemsInSection(section as Integer) as Integer
- event numberOfSections as Integer
- event Open
- event Opening
- event pasteboardWriterForItem(indexPath as NSIndexPathMBS) as NSPasteboardItemMBS
- event performBatchUpdatesCompleted(tag as variant, finished as boolean)
- event performBatchUpdatesWork(tag as variant)
- event prefetchItems(indexPaths() as NSIndexPathMBS)
- event referenceSizeForFooterInSection(layout as NSCollectionViewLayoutMBS, section as Integer) as NSSizeMBS
- event referenceSizeForHeaderInSection(layout as NSCollectionViewLayoutMBS, section as Integer) as NSSizeMBS
- event ScaleFactorChanged(NewFactor as double)
- event shouldChangeItems(indexPaths() as NSIndexPathMBS, highlightState as Integer) as NSIndexPathMBS()
- event shouldDeselectItems(indexPaths() as NSIndexPathMBS) as NSIndexPathMBS()
- event shouldSelectItems(indexPaths() as NSIndexPathMBS) as NSIndexPathMBS()
- event sizeForItemAtIndexPath(layout as NSCollectionViewLayoutMBS, indexPath as NSIndexPathMBS) as NSSizeMBS
- event transitionLayout(fromLayout as NSCollectionViewLayoutMBS, toLayout as NSCollectionViewLayoutMBS) as NSCollectionViewTransitionLayoutMBS
- event updateDraggingItemsForDrag(draggingInfo as NSDraggingInfoMBS)
- event validateDrop(draggingInfo as NSDraggingInfoMBS, byref proposedIndexPath as NSIndexPathMBS, byref dropOperation as Integer) as Integer
- event viewForSupplementaryElement(kind as String, indexPath as NSIndexPathMBS) as NSViewMBS
- event willDisplayItem(item as NSCollectionViewItemMBS, indexPath as NSIndexPathMBS)
- event willDisplaySupplementaryView(view as NSViewMBS, elementKind as String, indexPath as NSIndexPathMBS)
- event willShowContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
- event writeItems(indexPaths() as NSIndexPathMBS, Pasteboard as NSPasteboardMBS) as Boolean
- 2 properties
- property ScrollView as NSScrollViewMBS
- property View as NSCollectionViewMBS
- method performBatchUpdates(tag as variant)
- 2 constants
Drop Operation
Constant | Value | Description |
---|---|---|
DropBefore | 1 |
The drop occurs before the collection view item to which the item was dragged. |
DropOn | 0 |
The drop occurs at the collection view item to which the item was dragged. |
Some examples using this control:
Blog Entries
- News from the MBS Xojo Plugins in version 21.5
- New desktop controls
- News from the MBS Xojo Plugins Version 21.3
- MonkeyBread Software Releases the MBS Xojo Plugins in version 21.3
- Smooth scrolling list control with ContainerControls
- Video about MBS Xojo Plugins 21.1
- MonkeyBread Software Releases the MBS Xojo Plugins in version 21.1
- NSCollectionView for Xojo
- MBS Xojo Plugins Version 21.0 News
- MonkeyBread Software Releases the MBS Xojo Plugins in version 21.0
Xojo Developer Magazine
Videos
Release notes
- Version 21.3
- Added more events for flow layout to NSCollectionViewControlMBS.
- Added pasteboardWriterForItem event for NSCollectionViewControlMBS control.
- Version 21.2
- Fixed NSCollectionViewControlMBS to work on macOS versions before 10.13.
- Version 21.1
- Improved NSCollectionViewControlMBS and rewrote parts of NSCollectionView Test example.
- Version 21.0
- Added NSCollectionViewControlMBS control to use Apple's implementation of a collection view in Xojo.
The items on this page are in the following plugins: MBS MacControls Plugin.
NSButtonControlMBS - NSComboBoxControlMBS