Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSTableControlMBS control.

Next items

NSTableControlMBS.acceptDrop(info as NSDraggingInfoMBS, row as Integer, dropOperation as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Called by TableView when the mouse button is released over a table view that previously decided to allow a drop.

info: An object that contains more information about this dragging operation.
row: The index of the proposed target row.
operation: The type of dragging operation.

Returns true if the drop operation was successful, otherwise false.

The data source should incorporate the data from the dragging pasteboard in the implementation of this method. You can use the draggingPasteboard method to get the data for the drop operation from info.
To accept a drop on the second row, row would be 2 and operation would be NSTableViewDropOn. To accept a drop below the last row, row would be TableView.numberOfRows and operation would be NSTableViewDropAbove.

NSTableControlMBS.BoundsChanged

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
The event called when the bounds, but not the frame, changed.

NSTableControlMBS.Close

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 15.2 ✅ Yes ❌ No ❌ No ❌ No

The control is about to close.
In Xojo version 2021r3 and newer this event is named Closing.

NSTableControlMBS.Closing

Type Topic Version
event Cocoa Controls 15.2

The control is about to close.
In older Xojo versions, this event is named Close.

NSTableControlMBS.ColumnDidMove(notification as NSNotificationMBS, oldColumn as Integer, newColumn as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 15.2 ✅ Yes ❌ No ❌ No ❌ No
This event informs the delegate that a column was moved by user action in the table view.

NSTableControlMBS.ColumnDidResize(notification as NSNotificationMBS, tableColumn as NSTableColumnMBS, OldWidth as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 15.2 ✅ Yes ❌ No ❌ No ❌ No
This event informs you that a column was resized in the table view.

NSTableControlMBS.ConstructContextualMenu(base as MenuItem, x as Integer, y as Integer) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 22.1 ✅ Yes ❌ No ❌ No ❌ No
This event is called when it is appropriate to display a contextual menu for the control.

NSTableControlMBS.ContextualMenuAction(hitItem as MenuItem) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Called when a menuitem is choosen.

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.

NSTableControlMBS.dataCell(tableColumn as NSTableColumnMBS, row as Int64) as NSCellMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 15.2 ✅ Yes ❌ No ❌ No ❌ No
Optional return a different cells for each row.

A different data cell can be returned for any particular tableColumn and row, or a cell that will be used for the entire row (a full width cell). The returned cell should properly implement copyWithZone:, since the cell may be copied by NSTableView. If the tableColumn is non-nil, and nil is returned, then the table will use the default cell from tableColumn.dataCellForRow(Row).

When each row is being drawn, this method will first be called with a nil tableColumn. At this time, you can return a cell that will be used to draw the entire row, acting like a group. If you do return a cell for the 'nil' tableColumn, be prepared to have the other corresponding datasource and delegate methods to be called with a 'nil' tableColumn value. If don't return a cell, the method will be called once for each tableColumn in the tableView, as usual.

NSTableControlMBS.didAddRowView(rowView as NSTableRowViewMBS, row as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Tells the delegate that a row view was added at the specified row.

rowView: The row view.
row: The index of the row.

At this point, the delegate can add extra views, or modify the properties of rowView.

This method is only valid for NSView-based table views.

NSTableControlMBS.didClickTableColumn(tableColumn as NSTableColumnMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 15.2 ✅ Yes ❌ No ❌ No ❌ No
Called if a table column was clicked on.

NSTableControlMBS.didDragTableColumn(tableColumn as NSTableColumnMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 15.2 ✅ Yes ❌ No ❌ No ❌ No
Sent at the time the mouse button goes up in tableView and tableColumn has been dragged during the time the mouse button was down.

tableColumn: The table column.

The behavior of this method on Mac OS X v10.5 is different from prior versions. On Mac OS X v 10.5 the dragged column is sent to the subclass. In earlier versions the table column that is currently located at the dragged column's original index is sent.

NSTableControlMBS.didRemoveRowView(rowView as NSTableRowViewMBS, row as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Tells the delegate that a row view was removed from the table at the specified row.

rowView: The row view.
row: The index of the row.

If row equals -1, the row is being deleted from the table and is no longer a valid row; otherwise row is a valid row that is being removed by being moved off screen.

This method is only valid for NSView-based table views.

NSTableControlMBS.didTile

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
The tableview did tile.

The internal tile function properly sizes the table view and its header view and marks it as needing display.

NSTableControlMBS.DoubleClick

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
The mouse made a double click.

NSTableControlMBS.draggingSessionEnded(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Implement this method to determine when a dragging session has ended.

session: The dragging session.
screenPoint: The ending drag location in screen coordinates.
operation: The drag operation. See NSDragOperation for supported values.

This delegate method can be used to determine when the dragging source operation ended at a specific location, such as the trash, by checking for an operation of NSDragOperationDelete.

NSTableControlMBS.draggingSessionWillBegin(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, rowIndexes as NSIndexSetMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Implement this method to determine when a dragging session will begin.

session: The dragging session.
screenPoint: The initial drag location in screen coordinates.
rowIndexes: The indexes of the rows to be dragged, excluding rows that were not dragged due to pasteboardItemForRow returning nil.

Implement this method to know when the dragging session is about to begin and to potentially modify the dragging session.
The dragged item order will directly match the pasteboard writer array used to begin the dragging session with the NSView method beginDraggingSessionWithItems. Hence, the order is deterministic, and can be used in acceptDrop when enumerating the NSDraggingInfo pasteboard classes.

NSTableControlMBS.EnableMenuItems

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No

The event where you can enable menu items.
In Xojo version 2021r3 and newer this event is named MenuBarSelected.

NSTableControlMBS.FocusLost

Type Topic Version
event Cocoa Controls 16.5

The control lost focus.
In older Xojo versions, this event is named LostFocus.

This only fires if the control itself lost focus and not a sub control.

NSTableControlMBS.FocusReceived

Type Topic Version
event Cocoa Controls 16.5

The control itself got focus.
In older Xojo versions, this event is named GotFocus.

This only fires if the control itself got focus and not a sub control.

NSTableControlMBS.FrameChanged

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
The event called when the frame changed.

This event notifies you, that the control changed it's bounding frame, which is position and/or size.

NSTableControlMBS.GotFocus

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No

The control itself got focus.
In Xojo version 2021r3 and newer this event is named FocusReceived.

This only fires if the control itself got focus and not a sub control.

NSTableControlMBS.heightOfRow(row as Int64) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 15.2 ✅ Yes ❌ No ❌ No ❌ No
Implement this event to support a table with varying row heights.

The height returned by this method should not include intercell spacing and must be greater than zero. Performance Considerations: For large tables in particular, you should make sure that this method is efficient. NSTableView may cache the values this method returns, but this should NOT be depended on, as all values may not be cached. To signal a row height change, call noteHeightOfRowsWithIndexesChanged. For a given row, the same row height should always be returned until noteHeightOfRowsWithIndexesChanged is called, otherwise unpredicable results will happen. NSTableView automatically invalidates its entire row height cache in reloadData, and noteNumberOfRowsChanged.

NSTableControlMBS.isGroupRow(row as Int64) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 15.2 ✅ Yes ❌ No ❌ No ❌ No
Invoked to allow the delegate to indicate that a specified row is a group row.

row: The row index.

Return true if the specified row should have the group row style drawn, false otherwise.

If the cell in row is an NSTextFieldCell and contains only a string, the group row style attributes will automatically be applied to the cell.

Group rows in view-based table views can be made to visually ‘float' by setting the tableview method setFloatsGroupRows to true.

Note: When configured as a source list style table view, rows identified as group rows draw with a specific style unique for source lists.
Available in Mac OS X v10.5 and later.

NSTableControlMBS.LeftMouseDown(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Informs the receiver that the user has pressed the left mouse button.

This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.

NSTableControlMBS.LeftMouseDragged(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Informs the receiver that the user has moved the mouse with the left button pressed.

This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.

NSTableControlMBS.LeftMouseUp(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Informs the receiver that the user has released the left mouse button.

This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.

NSTableControlMBS.LostFocus

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No

The control lost focus.
In Xojo version 2021r3 and newer this event is named FocusLost.

This only fires if the control itself lost focus and not a sub control.

NSTableControlMBS.MenuBarSelected

Type Topic Version
event Cocoa Controls 17.1

The event where you can enable menu items.
In older Xojo versions, this event is named EnableMenuItems.

NSTableControlMBS.MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
The mouse button was pressed inside the control’s region at the location passed in to x, y.

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.

NSTableControlMBS.mouseDownInHeaderOfTableColumn(tableColumn as NSTableColumnMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 15.2 ✅ Yes ❌ No ❌ No ❌ No
Sent to the subclass whenever the mouse button is clicked in the table view's header column.

tableColumn: The table column.

NSTableControlMBS.MouseDrag(x as Integer, y as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
This event fires continuously after the mouse button was pressed inside the Control.

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.

NSTableControlMBS.MouseUp(x as Integer, y as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
The mouse button was released.

Use the x and y parameters to determine if the mouse button was released within the control's boundaries.

NSTableControlMBS.namesOfPromisedFilesDroppedAtDestination(dropDestination as folderItem, DraggedRowsWithIndexes as NSIndexSetMBS) as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Returns an array of filenames that represent the indexSet rows for a drag to dropDestination.

dropDestination: The drop location where the files are created.
indexSet: The indexes of the items being dragged.

Returns an array of filenames (not full paths) for the created files that the receiver promises to create.

This method is called when a destination has accepted a promise drag.
For more information on file promise dragging, see documentation on the NSDraggingSource protocol and namesOfPromisedFilesDroppedAtDestination:.

NSTableControlMBS.nextTypeSelectMatchFromRow(startRow as Int64, endRow as Int64, searchString as string) as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 15.2 ✅ Yes ❌ No ❌ No ❌ No
Invoked to allow the subclass to modify how type selection works.

startRow: The starting row of the search range.
endRow: The ending row of the search range.
searchString: A string containing the typed selection.

Return the first row in the range of startRow through endRow (excluding endRow itself) that matches selectionString. Return -1 if no match is found.

It is possible for endRow to be less than startRow if the search will wrap.
Available in Mac OS X v10.5 and later.

NSTableControlMBS.numberOfRowsInTableView as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Called when the table view needs to know the number of rows.

numberOfRowsInTableView is called very frequently, so it must be efficient.

NSTableControlMBS.objectValue(column as NSTableColumnMBS, row as Integer) as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Called when a value is required for a given cell.

Please implement your own arrays to store values.

NSTableControlMBS.Open

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 15.2 ✅ Yes ❌ No ❌ No ❌ No

The control is about to was created and you can initialize it.
In Xojo version 2021r3 and newer this event is named Opening.

NSTableControlMBS.Opening

Type Topic Version
event Cocoa Controls 15.2

The control is about to was created and you can initialize it.
In older Xojo versions, this event is named Open.

NSTableControlMBS.OtherMouseDown(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Informs the receiver that the user has pressed a mouse button other than the left or right one.

This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.

NSTableControlMBS.OtherMouseDragged(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Informs the receiver that the user has moved the mouse with a button other than the left or right button pressed.

This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.

NSTableControlMBS.OtherMouseUp(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Informs the receiver that the user has released a mouse button other than the left or right button.

This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.

NSTableControlMBS.pasteboardItemForRow(row as Integer) as NSPasteboardItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Called to allow the table to support multiple item dragging.

row: The row.

Returns an instance of NSPasteboardItem. Returning nil excludes the row from being dragged.

This method is required for multi-image dragging.
If this method is implemented, then writeRowsWithIndexes will not be called.

This is pasteboardWriterForRow method.

NSTableControlMBS.RightMouseDown(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Informs the view that the user has pressed the right mouse button.

This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.

NSTableControlMBS.RightMouseDragged(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Informs the receiver that the user has moved the mouse with the right button pressed .

This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.

NSTableControlMBS.RightMouseUp(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Informs the receiver that the user has released the right mouse button.

This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.

NSTableControlMBS.rowActionsForRow(row as Integer, edge as Integer) as NSTableViewRowActionMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Asks the control to provide an array of row actions to be attached to the specified edge of a table row and displayed when the user swipes horizontally across the row.

row: The index of the target row.
edge: The edge (NSTableRowActionEdgeLeading or NSTableRowActionEdgeTrailing) for which row actions are requested. This is based on the direction in which the user swiped on the row. Swiping to the right results in an edge value of leading. Swiping to the left results in an edge value of trailing.

Returns an array of row actions (of class NSTableViewRowActionMBS) to be enabled on the specified edge of the table row.

Implement this method if your table row supports actions that are displayed when the user swipes horizontally across the row. For example, your table view could use this method to implement a swipe left to delete function in your table rows. When called, this method receives the table view, the index of the row the user swiped, and an edge of type NSTableRowActionEdge. The method should return an array of any row actions of class NSTableViewRowAction that are supported for the specified edge. If no row actions are available, an empty array should be returned.
If this method isn’t implemented, then the table row displays no actions when the user swipes horizontally away from the specified edge.

NSTableControlMBS.rowViewForRow(row as Integer) as NSTableRowViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
Asks the delegate for a view to display the specified row.

row: The row index.

Return an instance or subclass of NSTableRowView. If nil is returned, an NSTableRowView instance will be created and used.

You can implement this event to return a custom NSTableRowView for row.
The reuse queue can be used in the same way as documented in tableView:view:row:. The returned view will have attributes properly set to it before it’s added to the tableView.

This method is only valid for NSView-based table views.

NSTableControlMBS.ScaleFactorChanged(NewFactor as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
The backing store scale factor has changed.

Please invalidate any cached bitmaps or other relevant state.

Next items

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


The biggest plugin in space...