Xojo Developer Conference
Join us from 25th to 27th April 2018 in Denver.

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items Next items

NSTableControlMBS.numberOfRowsInTableView as Integer
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Called when the table view needs to know the number of rows.
Notes: numberOfRowsInTableView is called very frequently, so it must be efficient.
NSTableControlMBS.objectValue(column as NSTableColumnMBS, row as Integer) as Variant
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Called when a value is required for a given cell.
Notes: Please implement your own arrays to store values.
NSTableControlMBS.OtherMouseDown(e as NSEventMBS) as boolean
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Informs the receiver that the user has pressed a mouse button other than the left or right one.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.
NSTableControlMBS.OtherMouseDragged(e as NSEventMBS) as boolean
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Informs the receiver that the user has moved the mouse with a button other than the left or right button pressed.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.
NSTableControlMBS.OtherMouseUp(e as NSEventMBS) as boolean
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Informs the receiver that the user has released a mouse button other than the left or right button.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.
NSTableControlMBS.pasteboardItemForRow(row as Integer) as NSPasteboardItemMBS
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Called to allow the table to support multiple item dragging.
Notes:
row: The row.

Returns an instance of NSPasteboardItem. Returning nil excludes the row from being dragged.

This method is required for multi-image dragging.
If this method is implemented, then writeRowsWithIndexes will not be called.
NSTableControlMBS.RightMouseDown(e as NSEventMBS) as boolean
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Informs the view that the user has pressed the right mouse button.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.
NSTableControlMBS.RightMouseDragged(e as NSEventMBS) as boolean
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Informs the receiver that the user has moved the mouse with the right button pressed .
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.
NSTableControlMBS.RightMouseUp(e as NSEventMBS) as boolean
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Informs the receiver that the user has released the right mouse button.
Notes: This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.
NSTableControlMBS.rowActionsForRow(row as Integer, edge as Integer) as NSTableViewRowActionMBS()
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Asks the control to provide an array of row actions to be attached to the specified edge of a table row and displayed when the user swipes horizontally across the row.
Notes:
row: The index of the target row.
edge: The edge (NSTableRowActionEdgeLeading or NSTableRowActionEdgeTrailing) for which row actions are requested. This is based on the direction in which the user swiped on the row. Swiping to the right results in an edge value of leading. Swiping to the left results in an edge value of trailing.

Returns an array of row actions (of class NSTableViewRowActionMBS) to be enabled on the specified edge of the table row.

Implement this method if your table row supports actions that are displayed when the user swipes horizontally across the row. For example, your table view could use this method to implement a swipe left to delete function in your table rows. When called, this method receives the table view, the index of the row the user swiped, and an edge of type NSTableRowActionEdge. The method should return an array of any row actions of class NSTableViewRowAction that are supported for the specified edge. If no row actions are available, an empty array should be returned.
If this method isn’t implemented, then the table row displays no actions when the user swipes horizontally away from the specified edge.
NSTableControlMBS.rowViewForRow(row as Integer) as NSTableRowViewMBS
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Asks the delegate for a view to display the specified row.
Notes:
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.
NSTableControlMBS.ScaleFactorChanged(NewFactor as Double)
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: The backing store scale factor has changed.
Notes: Please invalidate any cached bitmaps or other relevant state.
NSTableControlMBS.SelectionDidChange(notification as NSNotificationMBS)
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: This event informs you that the table view's selection has changed.
NSTableControlMBS.selectionIndexesForProposedSelection(proposedSelectionIndexes as NSIndexSetMBS) as NSIndexSetMBS
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Invoked to allow the delegate to modify the proposed selection.
Notes:
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)
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: 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).
NSTableControlMBS.selectionShouldChangeInTableView as boolean
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Returns whether the selection should change.
Notes:
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)
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Called when a cell value is saved to the datasource.
NSTableControlMBS.shouldEditTableColumn(tableColumn as NSTableColumnMBS, row as Int64) as boolean
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Returns whether the cell at the specified row and column can be edited.
Notes:
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
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Sent to the subclass to allow or prohibit the specified column to be dragged to a new location.
Notes:
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
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Returns whether the table view should allow selection of the specified row.
Notes:
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
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Returns whether the specified table column can be selected.
Notes:
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
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Invoked to allow the subclass to control cell expansion for a specific row and column.
Notes:
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
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Invoked to allow the subclass to control the tracking behavior for a specific cell.
Notes:
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
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Invoked to allow the subclass to control type select for a specific event.
Notes:
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
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Invoked to allow the subclass to provide custom sizing behavior when a column's resize divider is double clicked.
Notes:
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)
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Called by TableView to indicate that sorting may need to be done.
Notes: 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
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: The event called to decide whether text editing should be allowed.
Notes: Return true to allow.
NSTableControlMBS.textShouldEndEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as boolean
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: The event called to decide whether ending text editing should be allowed.
Notes: Return true to allow.
NSTableControlMBS.toolTipForCell(cell as NSCellMBS, r as NSRectMBS, tableColumn as NSTableColumnMBS, row as Int64, mouseLocation as NSPointMBS) as string
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Returns a string that is displayed as a tooltip for the specified cell in the column and row.
Notes:
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
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Invoked to allow the subclass to provide an alternate text value used for type selection for a specified row and column.
Notes:
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.

Previous items Next items

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




Links
MBS Xojo Plugins