Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSTableViewMBS class.
NSTableViewMBS.setDropRow(row as Integer, dropOperation as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
row: The target row index.
dropOperation: The drop operation. Supported values are specified by NSTableViewDropOperation.
For example, to specify a drop on the second row, specify row as 1, and operation as NSTableViewDropOn. To specify a drop below the last row, specify row as [self numberOfRows] and operation as NSTableViewDropAbove.
Passing a value of –1 for row and NSTableViewDropOn as the operation causes the entire table view to be highlighted rather than a specific row. This is useful if the data displayed by the table view does not allow the user to drop items at a specific row location.
NSTableViewMBS.setSortDescriptor(sortDescriptor as NSSortDescriptorMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
A table column is considered sortable if it has a sort descriptor that specifies the sorting direction, a key to sort by, and a selector defining how to sort.
The array of sort descriptors is archived. Sort descriptors persist along with other column information if an autosave name is set.
Calling setSortDescriptors may have the side effect of invoking the data source method tableViewSortDescriptorsDidChange.
NSTableViewMBS.setSortDescriptors(sortDescriptors() as NSSortDescriptorMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
A table column is considered sortable if it has a sort descriptor that specifies the sorting direction, a key to sort by, and a selector defining how to sort.
The array of sort descriptors is archived. Sort descriptors persist along with other column information if an autosave name is set.
Calling setSortDescriptors may have the side effect of invoking the data source method tableViewSortDescriptorsDidChange.
NSTableViewMBS.sizeLastColumnToFit
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
All columns are resized to the same size, up to a column's maximum size. This method then invokes tile.
NSTableViewMBS.sortDescriptors as NSSortDescriptorMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSTableViewMBS.tableColumns as NSTableColumnMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The array returned by tableColumns contains all receiver's columns, including those that are hidden.
Some examples using this method:
NSTableViewMBS.tableColumnWithIdentifier(identifier as string) as NSTableColumnMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Returns the NSTableColumn object for the first column whose identifier is equal to anObject, as compared using isEqual:, or nil if no columns are found with the specified identifier.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Also resets cursor rectangles for the header view and line scroll amounts for the NSScrollView object.
NSTableViewMBS.unhideRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
indexes: An index set containing indexes of the hidden rows to be shown again.
rowAnimation: An animation effect to be applied when the rows are hidden.
Unhiding a table row causes the didAddRowView event to be invoked.
NSTableViewMBS.viewAtColumn(column as Integer, row as Integer, makeIfNecessary as Boolean) as NSViewMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
column: The index of the column in the tableColumns array.
row: The row index.
makeIfNecessary: true if a view is required, false if you want to update properties on a view, if one is available.
Returns an instance of NSView.
This method first attempts to return an available view, which is generally in the visible area. If there is no available view, and makeIfNecessary is true, a prepared temporary view is returned. If makeIfNecessary is false, and the view is not available, nil will be returned.
In general, makeIfNecessary should be true if you require a resulting view, and false if you only want to update properties on a view only if it is available (generally this means it is visible).
An exception will be thrown if row is not within the numberOfRows. The returned result should generally not be held onto for longer than the current run loop cycle. Instead they should re-query the table view for the row view.
The items on this page are in the following plugins: MBS MacControls Plugin.