Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSTableControlMBS control.
NSTableControlMBS.SelectionDidChange(notification as NSNotificationMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 15.2 | ✅ Yes | ❌ No | ❌ No | ❌ No |
NSTableControlMBS.selectionIndexesForProposedSelection(proposedSelectionIndexes as NSIndexSetMBS) as NSIndexSetMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 15.2 | ✅ Yes | ❌ No | ❌ No | ❌ No |
proposedSelectionIndexes: An index set containing the indexes of the proposed selection.
Return an NSIndexSet instance containing the indexes of the new selection. Return proposedSelectionIndexes if the proposed selection is acceptable, or the value of the table view's existing selection to avoid changing the selection.
This method may be called multiple times with one new index added to the existing selection to find out if a particular index can be selected when the user is extending the selection with the keyboard or mouse.
Implementation of this method is optional. If implemented, this method will be called instead of shouldSelectRow.
Available in Mac OS X v10.5 and later.
NSTableControlMBS.SelectionIsChanging(notification as NSNotificationMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 15.2 | ✅ Yes | ❌ No | ❌ No | ❌ No |
NSTableControlMBS.selectionShouldChangeInTableView 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 the table view to change its selection (typically a row being edited), false to deny selection change.
The user can select and edit different cells within the same row, but can't select another row unless the delegate approves. The subclass can implement this method for complex validation of edited rows based on the values of any of their cells.
NSTableControlMBS.setObjectValue(value as Variant, column as NSTableColumnMBS, row as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
NSTableControlMBS.shouldEditTableColumn(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 |
TableColumn: The table column.
rowIndex: The row index.
Return true to allow editing the cell, false to deny editing.
The subclass can implement this method to disallow editing of specific cells.
Note: This method is only valid for cell-based table views.
NSTableControlMBS.shouldReorderColumn(columnIndex as Int64, newColumnIndex 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 |
columnIndex: The index of the column being dragged.
newColumnIndex: The proposed target index of the column.
Return true if the column reordering should be allowed, otherwise false.
When a column is initially dragged by the user, the delegate is first called with a newColumnIndex value of -1. Returning false will disallow that column from being reordered at all. Returning true allows it to be reordered, and the delegate will be called again when the column reaches a new location.
The actual NSTableColumn instance can be retrieved from the tableColumns array.
If this method is not implemented, all columns are considered reorderable.
Available in Mac OS X v10.6 and later.
NSTableControlMBS.shouldSelectRow(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 |
rowIndex: The row index.
Return true to permit selection of the row, false to deny selection.
The delegate can implement this method to disallow selection of particular rows.
For better performance and finer-grain control over the selection, use selectionIndexesForProposedSelection.
NSTableControlMBS.shouldSelectTableColumn(tableColumn as NSTableColumnMBS) as boolean
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.
Return true to permit selection, otherwise false.
The subclass can implement this event to disallow selection of particular columns.
NSTableControlMBS.shouldShowCellExpansion(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 |
TableColumn: The table column.
row: The row index.
Return true if the tooltip cell should expand, false otherwise.
Cell expansion can occur when the mouse hovers over the specified cell and the cell contents are unable to be fully displayed within the cell. If this method returns true, the full cell contents will be shown in a special floating tool tip view, otherwise the content is truncated.
Note: This method is only valid for cell-based table views.
Available in Mac OS X v10.5 and later.
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.