Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSTableViewMBS class.

NSTableViewMBS.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 9.2 ✅ Yes ❌ No ❌ No ❌ No
This event informs the delegate that a column was moved by user action in the table view.

NSTableViewMBS.ColumnDidResize(notification as NSNotificationMBS, column as NSTableColumnMBS, index as Integer)

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

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ 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.

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

NSTableViewMBS.didClickTableColumn(tableColumn as NSTableColumnMBS)

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

NSTableViewMBS.didDragTableColumn(tableColumn as NSTableColumnMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ 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.

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

NSTableViewMBS.DoubleClick

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No
A double click was recognized.

NSTableViewMBS.heightOfRow(row as Int64) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ 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.

NSTableViewMBS.isGroupRow(row as Int64) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ 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.

NSTableViewMBS.mouseDownInHeaderOfTableColumn(tableColumn as NSTableColumnMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ 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.

NSTableViewMBS.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 12.0 ✅ 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.

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

NSTableViewMBS.SelectionDidChange(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 9.2 ✅ Yes ❌ No ❌ No ❌ No
This event informs you that the table view's selection has changed.

NSTableViewMBS.selectionIndexesForProposedSelection(proposedSelectionIndexes as NSIndexSetMBS) as NSIndexSetMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ Yes ❌ No ❌ No ❌ No
Invoked to allow the delegate to modify the proposed selection.

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.

NSTableViewMBS.SelectionIsChanging(notification as NSNotificationMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 9.2 ✅ Yes ❌ No ❌ No ❌ No
This event informs you that the table view's selection is in the process of changing (typically because the user is dragging the mouse across a number of rows).

NSTableViewMBS.selectionShouldChangeInTableView as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ Yes ❌ No ❌ No ❌ No
Returns whether the selection should change.

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.

NSTableViewMBS.shouldEditTableColumn(tableColumn as NSTableColumnMBS, row as Int64) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ Yes ❌ No ❌ No ❌ No
Returns whether the cell at the specified row and column can be edited.

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.

NSTableViewMBS.shouldReorderColumn(columnIndex as Int64, newColumnIndex as Int64) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ Yes ❌ No ❌ No ❌ No
Sent to the subclass to allow or prohibit the specified column to be dragged to a new location.

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.

NSTableViewMBS.shouldSelectRow(row as Int64) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ Yes ❌ No ❌ No ❌ No
Returns whether the table view should allow selection of the specified row.

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.

NSTableViewMBS.shouldSelectTableColumn(tableColumn as NSTableColumnMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ Yes ❌ No ❌ No ❌ No
Returns whether the specified table column can be selected.

TableColumn: The table column.

Return true to permit selection, otherwise false.

The subclass can implement this event to disallow selection of particular columns.

NSTableViewMBS.shouldShowCellExpansion(tableColumn as NSTableColumnMBS, row as Int64) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ Yes ❌ No ❌ No ❌ No
Invoked to allow the subclass to control cell expansion for a specific row and column.

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.

NSTableViewMBS.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 12.0 ✅ Yes ❌ No ❌ No ❌ No
Invoked to allow the subclass to control the tracking behavior for a specific cell.

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.

NSTableViewMBS.shouldTypeSelectForEvent(e as NSEventMBS, searchString as string) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ Yes ❌ No ❌ No ❌ No
Invoked to allow the subclass to control type select for a specific event.

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.

NSTableViewMBS.sizeToFitWidthOfColumn(column as Int64) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ Yes ❌ No ❌ No ❌ No
Invoked to allow the subclass to provide custom sizing behavior when a column's resize divider is double clicked.

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.

NSTableViewMBS.textShouldBeginEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as boolean

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

Return true to allow.

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

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

Return true to allow.

NSTableViewMBS.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 12.0 ✅ 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.

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ 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.

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

NSTableViewMBS.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 12.0 ✅ 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.

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


The biggest plugin in space...