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
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 Desktop only
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 Desktop only
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 Desktop only
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 Desktop only
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 Desktop only
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 Desktop only
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 Desktop only
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 Desktop only
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 Desktop only
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 Desktop only
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 Desktop only
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 Desktop only
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.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
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 Desktop only
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 Desktop only
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 Desktop only
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 Desktop only
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 Desktop only
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...