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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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.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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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.