Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSTableControlMBS control.
NSTableControlMBS.shouldTrackCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, 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 |
cell: The cell to track.
tableColumn: The table column.
row: A row in tableView.
Returns true if the cell should track, false otherwise.
Normally, only selectable or selected cells can be tracked. If you implement this method, cells which are not selectable or selected can be tracked, and vice-versa.
For example, this allows you to have an NSButtonCell in a table which does not change the selection, but can still be clicked on and tracked.
Note: This method is only valid for cell-based table views.
Available in Mac OS X v10.5 and later.
NSTableControlMBS.shouldTypeSelectForEvent(e as NSEventMBS, searchString as string) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 15.2 | ✅ Yes | ❌ No | ❌ No | ❌ No |
event: The event.
searchString: The search string or nil if no type select has began.
Return true to allow type select for event, false otherwise.
Typically, this is called from the table view keyDown implementation and the event will be a key event.
Available in Mac OS X v10.5 and later.
NSTableControlMBS.sizeToFitWidthOfColumn(column 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 |
column: The index of the column.
Returns the width of the specified column.
By default, NSTableView iterates every row in the table, accesses a cell via preparedCellAtColumn, and requests the cellSize to find the appropriate largest width to use.
For accurate results and performance, it is recommended that this method is implemented when using large tables. By default, large tables use a monte carlo simulation instead of iterating every row.
Available in Mac OS X v10.6 and later.
NSTableControlMBS.sortDescriptorsDidChange(oldDescriptors() as NSSortDescriptorMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
The data source typically sorts and reloads the data, and adjusts the selections accordingly. If you need to know the current sort descriptors and the data source doesn’t manage them itself, you can get the current sort descriptors by calling TableView.sortDescriptors function.
NSTableControlMBS.textShouldBeginEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 15.2 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Return true to allow.
NSTableControlMBS.textShouldEndEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 15.2 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Return true to allow.
NSTableControlMBS.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 | 15.2 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSTableControlMBS.typeSelectString(tableColumn as NSTableColumnMBS, row as Int64) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 15.2 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSTableControlMBS.updateDraggingItemsForDrag(draggingInfo as NSDraggingInfoMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSTableControlMBS.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 | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSTableControlMBS.view(tableColumn as NSTableColumnMBS, row as Integer) as NSViewMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
see also
https://developer.apple.com/reference/appkit/nstableviewdelegate/1527449-tableview?language=objc
See also:
NSTableControlMBS.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 | 15.2 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
The internal tile function properly sizes the table view and its header view and marks it as needing display.
NSTableControlMBS.writeRowsWithIndexes(rowIndexes as NSIndexSetMBS, pboard as NSPasteboardMBS) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
The items on this page are in the following plugins: MBS MacControls Plugin.