Platforms to show: All Mac Windows Linux Cross-Platform

Next items

NSCollectionViewControlMBS.acceptDrop(draggingInfo as NSDraggingInfoMBS, indexPath as NSIndexPathMBS, dropOperation as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Incorporates the dropped content into the collection view.
Notes:
draggingInfo: The information about the drag operation.
indexPath: The index path at which the drop occurred. Use this location as the insertion point for the content.
dropOperation: The type of drop operation to perform.

Return true if the drop operation should be accepted or false if it should be rejected.

The collection view calls this event when the user releases the mouse button while it is over a valid drop target. This event is called after the validateDrop method validates that dropping the content at the specified location is possible. You must implement this event to accept the dropped content and incorporate it into the collection view.

In your implementation, use the information in the draggingInfo parameter to retrieve the data, update your data source object, and insert the appropriate items into the collection view. The dropped data is stored in the draggingPasteboard property of the dragging information object.

If the animatesToDestination property of the dragging information is true, update the image and frame for each dragged item to its new location in the collection view.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.BoundsChanged
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: The event called when the bounds, but not the frame, changed.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.cancelPrefetchingForItems(indexPaths() as NSIndexPathMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Notifies your 'prefetchDataSource' that items at the specified 'indexPaths', for which the CollectionView previously sent prefetchItems evnet, are no longer expected to be displayed.
Notes: This is a good opportunity to cancel any pending resource fetches you've initiated for the items, if possible and worthwhile. This is only sent for items that don't end up being displayed; CollectionView doesn't cancel prefetching for items that it actually instantiates and shows.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.canDragItems(indexPaths() as NSIndexPathMBS, NSEvent as NSEventMBS) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Returns a Boolean indicating whether a drag operation involving the specified items can begin.
Notes:
indexPaths: The index paths of the items about to be dragged.
event: The mouse-down event that began the drag operation.

Return true if the drag operation can begin or false if it cannot.

If you do not implement this event, the collection view assumes a return value of true.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.didChangeItems(indexPaths() as NSIndexPathMBS, highlightState as Integer)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Asks the delegate to approve the pending highlighting of the specified items.
Notes:
indexPaths: The array of NSIndexPathMBS objects corresponding to the items being highlighted.
highlightState: The new highlight state for the items.

Returns the array of NSIndexPath objects corresponding to the items that you want to receive the specified highlight. If you do not want any items to receive the specified highlight state, return an empty set.

Use this method to approve or modify the set of items targeted to receive the specified highlight state. During interactive selection or dragging, the collection view calls this method when actions occur that would affect the highlight state of items. Your implementation of the method can return the proposed set of index paths as-is or modify the set and disallow the highlighting of some or all of the items. Removing items from the set suppresses the corresponding actions, such as selecting the item or showing its eligibility as a drop target.

If you do not implement this method, the collection view updates the highlight state for the items specified by the indexPaths parameter.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.didDeselectItems(indexPaths() as NSIndexPathMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Notifies the delegate object that one or more items were deselected.
Notes:
indexPaths: The array of NSIndexPathMBS objects corresponding to the items that were deselected.

After the user successfully deselects one or more items, the collection view calls this method to let you know that the items are no longer selected. Use this method to respond to the selection change and to make any necessary adjustments to your content or the collection view.
This method is not called when you set the selection programmatically using the methods of the NSCollectionViewMBS class.

Some examples using this event:

Feedback, Comments & Corrections

NSCollectionViewControlMBS.didEndDisplayingItem(item as NSCollectionViewItemMBS, indexPath as NSIndexPathMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Notifies the delegate that the specified item was removed from the collection view.
Notes:
item: The item that was removed.
indexPath: The index path of the item.

The collection view calls this method after removing an item from its content. You can use this method to track the removal of items and perform related tasks.

Some examples using this event:

Feedback, Comments & Corrections

NSCollectionViewControlMBS.didEndDisplayingSupplementaryView(view as NSViewMBS, elementKind as String, indexPath as NSIndexPathMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Notifies the delegate that the specified supplementary view was removed from the collection view.
Notes:
view: The supplementary view that was removed.
elementKind: The type of the supplementary view. Layouts are responsible for defining the types of supplementary views they support.
indexPath: The index path associated with the supplementary view.

The collection view calls this method after removing a supplementary view from its content. You can use this method to track the removal of views and perform related tasks.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.didSelectItems(indexPaths() as NSIndexPathMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Notifies the delegate object that one or more items were selected.
Notes:
collectionView: The collection view notifying you of the selection change.
indexPaths: The array of NSIndexPathMBS objects corresponding to the items that are now selected.

After the user successfully selects one or more items, the collection view calls this method to let you know that the selection has been made. Use this method to respond to the selection change and to make any necessary adjustments to your content or the collection view.
This method is not called when you set the selection programmatically using the methods of the NSCollectionViewMBS class.

Some examples using this event:

Feedback, Comments & Corrections

NSCollectionViewControlMBS.draggingImageForItems(indexPaths() as NSIndexPathMBS, NSEvent as NSEventMBS, byref dragImageOffset as NSPointMBS) as NSImageMBS
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Creates and returns a drag image to represent the specified items during a drag.
Notes:
indexPaths: The index paths of the items being dragged.
NSEvent: The mouse-down event that began the drag operation. You can use the mouse location when determining what value to return in the dragImageOffset parameter.
dragImageOffset: The offset value to use when positioning the image. On input, the point is NSZeroPoint, which centers the returned image under the mouse. Your method can return a different point that repositions the drag image by the specified offset values.

Return the image to use for the dragged items.

Your implementation of this event should create an appropriate image to use during the drag operation. The collection view places the center of your image at the current mouse location. Update the value in the dragImageOffset parameter to shift the position of your image by the specified amount.
If you do not implement this event, the collection view uses the drag image returned by the draggingImageForItemsAtIndexPaths method instead.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.draggingSessionEnded(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, dragOperation as Integer)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Notifies your delegate that a drag session ended.
Notes:
session: The dragging session that ended.
screenPoint: The end point (in screen coordinates) for the drag operation.
operation: The operation that was performed. Use this value to determine how the operation ended. For example, for content that was dragged to the trash, the operation type would be NSDragOperationDelete (32).

You can use this method to perform tasks related to the ending of a drag session.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.draggingSessionWillBegin(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, indexPaths() as NSIndexPathMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Notifies your delegate that a drag session is about to begin.
Notes:
session: The dragging session that is about to begin.
screenPoint: The starting point (in screen coordinates) for the drag operation. (in Cocoa coordinate system with bottom = zero)
indexPaths: The index paths of the items being dragged.

You can use this method to modify the dragging session or to perform other tasks related to the beginning of a drag session.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.EnableMenuItems
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: The event where you can enable menu items.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.FrameChanged
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: The event called when the frame changed.
Notes: This event notifies you, that the control changed it's bounding frame, which is position and/or size.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.GotFocus
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: The control itself got focus.
Notes: This only fires if the control itself got focus and not a sub control.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.insetForSectionAtIndex(layout as NSCollectionViewLayoutMBS, section as Integer) as NSEdgeInsetsMBS
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.3 ✅ Yes ❌ No ❌ No ❌ No
Function: Asks you for the margins to apply to content in the specified section.
Notes:
collectionViewLayout: The layout object requesting the information.
section: The index of the section whose margins are needed.

Return the margins to apply to items in the specified section.

Implement this method when you want to provide margins for sections in the flow layout. Your implementation can return the same margins for all sections or it can return different margins for different sections. You can also adjust the margins of each section dynamically each time you update the layout. If you do not implement this method, the margins are obtained from the properties of the flow layout object.

The insets you return reflect the spacing between the items and the header and footer views of the section. They also reflect the spacing at the edges of a single row or column. For more information about how insets are applied, see the description of the sectionInset property.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.ItemApplyLayoutAttributes(item as NSCollectionViewItemMBS, layoutAttributes as NSCollectionViewLayoutAttributesMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Applies the specified layout attributes to the element.
Notes: In your custom elements, you can use this method to apply the specified attributes to your content. For example, if your element object is a view controller, you would override this method and use it to apply the attributes to the root view object. When using your element with a layout object that supports custom attributes, you would also use this method to apply those custom attributes.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.ItemDidTransition(item as NSCollectionViewItemMBS, oldLayout as NSCollectionViewLayoutMBS, newLayout as NSCollectionViewLayoutMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Tells the element that the layout object of the collection view changed.
Notes:
oldLayout: The collection view’s previous layout object.
newLayout: The current layout object associated with the collection view.

The default implementation of this method does nothing. Subclasses can override it and use it to finalize any behaviors associated with the change in layouts.

In OS X 10.11, this method is never called.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.itemForRepresentedObject(indexPath as NSIndexPathMBS) as NSCollectionViewItemMBS
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Asks your data source object to provide the item at the specified location in the collection view.
Notes:
indexPath: The index path that specifies the location of the item. This index path contains both the section index and the item index within that section.

Returns a configured item object. You must not return nil from this method.

All data source objects must implement this method. Your implementation is responsible for creating, configuring, and returning the appropriate item object based on the specified index path. You do this by calling the makeItem() method of the collection view to retrieve an empty item object of the appropriate type. After receiving the item object, update its properties with the data from your app’s data structures and return it.
You do not need to set the frame of an item’s view from this method. The collection view gets the item’s location and other layout-related attributes from the layout object during a separate step.

Some examples using this event:

Feedback, Comments & Corrections

NSCollectionViewControlMBS.ItemPreferredLayoutAttributesFittingAttributes(item as NSCollectionViewItemMBS, layoutAttributes as NSCollectionViewLayoutAttributesMBS) as NSCollectionViewLayoutAttributesMBS
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Asks your element if it wants to modify any layout attributes before they are applied.
Notes:
layoutAttributes: The attributes provided by the layout object. These attributes represent the values that the layout object intends to apply to the element.

Return the final attributes to apply to the element.

The default implementation of this method returns the same attributes that are in the layoutAttributes parameter. You can override this method in subclasses and use it to return a different set of attributes. If you override this method, call super first to give the system the opportunity to make changes, then modify the returned attributes.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.ItemPrepareForReuse(item as NSCollectionViewItemMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Performs any necessary cleanup to prepare the element for use again.
Notes:
The recycling of content is an important technique for improving performance of a collection view. Instead of creating all views from scratch, the collection view recycles views and view controllers that move offscreen. When your app subsequently calls the makeItem or makeSupplementaryViewOfKind method, the collection view retrieves a recycled object from the appropriate storage, calls this method, and then returns the object to your app.

Implement this method when you need to delete old data or when you want to restore your recycled views to a standard initial state prior to their reuse. For example, you might use this method to restore the size of a view to some standard size or reset the alpha to 1.0 to ensure that the view is fully opaque. Do not use this method to configure the view with new data. Restoring your views to a default state in this method simplifies the configuration code you must write in your data source object later.

Some examples using this event:

Feedback, Comments & Corrections

NSCollectionViewControlMBS.ItemWillTransition(item as NSCollectionViewItemMBS, oldLayout as NSCollectionViewLayoutMBS, newLayout as NSCollectionViewLayoutMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Tells the element that the layout object of the collection view is about to change.
Notes:
oldLayout: The current layout object used by the collection view.
newLayout: The new layout object that is about to be used by the collection view.

The default implementation of this method does nothing. Subclasses can override it and use it to prepare for the change in layouts.

Special Considerations
In OS X 10.11, this method is never called.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.LostFocus
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: The control lost focus.
Notes: This only fires if the control itself lost focus and not a sub control.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.MenuAction(HitItem as MenuItem) As Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: Called when a menuitem is choosen.
Notes: This allows the control to react on its relevant menu items. Please return true if you handled it or false to give others a chance.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.minimumInteritemSpacingForSectionAtIndex(layout as NSCollectionViewLayoutMBS, section as Integer) as double
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.3 ✅ Yes ❌ No ❌ No ❌ No
Function: Asks you for the spacing between successive items of a single row or column.
Notes:
collectionViewLayout: The layout object requesting the information.
section: The index of the section whose inter-item spacing is needed.

Return the minimum space (in points) to apply between successive items in a single row or column.

Implement this method when you want to provide custom inter-item spacing for sections in the flow layout. Your implementation can return the same spacing for all sections or it can return different spacing for different sections. You can also adjust the inter-item spacing of each section dynamically each time you update the layout. If you do not implement this method, the inter-item spacing is obtained from the properties of the flow layout object.

For a vertically scrolling layout, this value represents the minimum spacing between items in the same row. For a horizontally scrolling layout, this value represents the minimum spacing between items in the same column. The layout object uses this spacing only to compute how many items can fit in a single row or column. The actual spacing may be increased after the number of items has been determined. For more information about how inter-item spacing is applied, see the description of the minimumInteritemSpacing property.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.minimumLineSpacingForSectionAtIndex(layout as NSCollectionViewLayoutMBS, section as Integer) as double
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.3 ✅ Yes ❌ No ❌ No ❌ No
Function: Asks you for the spacing between successive rows or columns of a section.
Notes:
collectionViewLayout: The layout object requesting the information.
section: The index of the section whose line spacing is needed.

Returns the minimum space (in points) to apply between successive lines in a section.

Implement this method when you want to provide custom line spacing for sections in the flow layout. Your implementation can return the same line spacing for all sections or it can return different line spacing for different sections. You can also adjust the line spacing of each section dynamically each time you update the layout. If you do not implement this method, the line spacing is obtained from the properties of the flow layout object.

For a vertically scrolling layout, this value represents the minimum spacing between successive rows. For a horizontally scrolling layout, this value represents the minimum spacing between successive columns. This spacing is not applied to the space between the header and the first line or between the last line and the footer. For more information about how line spacing is applied, see the description of the minimumLineSpacing property.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: The mouse button was pressed inside the control’s region at the location passed in to x, y.
Notes:
The coordinates x and y are local to the control, i.e. they represent the position of the mouse click relative to the upper-left corner or the Control.
Return True if you are going to handle the MouseDown. In such a case:
  • The Action event, if any, will not execute and the state of the object will not change.
  • You will receive the MouseDrag and MouseUp events.
If you return False, the system handles the MouseDown so the above event handlers do not get called.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.MouseDrag(x as Integer, y as Integer)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: This event fires continuously after the mouse button was pressed inside the Control.
Notes:
Mouse location is local to the control passed in to x, y.
As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the mouse has really moved.

Feedback, Comments & Corrections

NSCollectionViewControlMBS.MouseUp(x As Integer, y As Integer)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Collection View MBS MacControls Plugin 21.0 ✅ Yes ❌ No ❌ No ❌ No
Function: The mouse button was released.
Notes: Use the x and y parameters to determine if the mouse button was released within the control's boundaries.

Feedback, Comments & Corrections

Next items

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

The biggest plugin in space...




Links
MBS FileMaker tutorial videos

Start Chat