Platforms to show: All Mac Windows Linux Cross-Platform

Back to DesktopNSTableControlMBS control.

Previous items

DesktopNSTableControlMBS.textShouldEndEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
The event called to decide whether ending text editing should be allowed.

Return true to allow.

DesktopNSTableControlMBS.toolTipForCell(cell as NSCellMBS, r as NSRectMBS, tableColumn as NSTableColumnMBS, row as Int64, mouseLocation as NSPointMBS) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Returns a string that is displayed as a tooltip for the specified cell in the column and row.

Cell: The cell.
r: The proposed active area of the tooltip. You can modify rect to provide an alternative active area.
TableColumn: The table column.
row: The row index.
mouseLocation: The mouse location.

Return a string containing the tooltip. Return empty string if no tooltip is desired.

By default, rect is computed as cell.drawingRectForBounds(cellFrame).
Available in Mac OS X v10.4 and later.

DesktopNSTableControlMBS.typeSelectString(tableColumn as NSTableColumnMBS, row as Int64) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Invoked to allow the subclass to provide an alternate text value used for type selection for a specified row and column.

tableColumn: The table column.
row: The row index.

Returns a string that is used in type select comparison for row and tableColumn. Return "" if the row or tableColumn should not be searched.

Implement this method to change the string value that is searched for based on what is displayed. By default, all cells with text in them are searched.

If this event is not implemented the string value is the cell string value.
Implementation of this event is optional.

Available in Mac OS X v10.5 and later.

DesktopNSTableControlMBS.updateDraggingItemsForDrag(draggingInfo as NSDraggingInfoMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Implement this method to allow the table to update dragging items as they are dragged over a view.

The dragging information.

Required for multi-image dragging. Typically this will involve invoking enumerateDraggingItemsWithOptions on the draggingInfo parameter value and setting the draggingItem object’s imageComponentsProvider to a proper image based on the content.
For view-based table views, you can use the NSTableCellView method draggingImageComponents. For cell-based tables, use the NSCell method draggingImageComponentsWithFrame.

DesktopNSTableControlMBS.validateDrop(info as NSDraggingInfoMBS, proposedRow as Integer, dropOperation as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Used by aTableView to determine a valid drop target.

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 proposed.

Returns the dragging operation the data source will perform.

The data source may retarget a drop by calling setDropRow and returning something other than NSDragOperationNone. A data source might retarget for various reasons, such as to provide better visual feedback when inserting into a sorted position.
To propose a drop on the second row, row would be 2 and operation would be NSTableViewDropOn. To propose a drop below the last row, row would be TableView.numberOfRows and operation would be NSTableViewDropAbove.

DesktopNSTableControlMBS.view(tableColumn as NSTableColumnMBS, row as Integer) as NSViewMBS

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

see also
https://developer.apple.com/reference/appkit/nstableviewdelegate/1527449-tableview?language=objc

See also:

DesktopNSTableControlMBS.willDisplayCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, row as Int64)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Informs you that the tableview will display the specified cell at the row in the column.

Cell: The cell to be displayed.
TableColumn: The table column.
row: The row index.

The event can modify the display attributes of cell to alter the appearance of the cell.

Because cell is reused for every row in tableColumn, the event must set the display attributes both when drawing special cells and when drawing normal cells.

Note: The implementation of this method must not draw portions of the cell. It should only alter the state of the passed in cell.

DesktopNSTableControlMBS.willTile

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

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

DesktopNSTableControlMBS.writeRowsWithIndexes(rowIndexes as NSIndexSetMBS, pboard as NSPasteboardMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Returns a Boolean value that indicates whether a drag operation is allowed.

rowIndexes: An index set of row numbers that will be participating in the drag.
pboard: The pasteboard to which to write the drag data.

Returns true if the drag operation is allowed, false otherwise.

Called by TableView after it has been determined that a drag should begin, but before the drag has been started.
To refuse the drag, return false. To start a drag, return true and place the drag data onto pboard (data, owner, and so on). The drag image and other drag-related information will be set up and provided by the table view once this call returns with true.

Previous items

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


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