Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items Next items

NSTableViewMBS.rectOfColumn(column as Integer) as NSRectMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 9.1 Yes No No Yes, macOS only No
Function: Returns the rectangle containing the column at at a given index.
Notes:
The rectangle containing the column at columnIndex. Returns NSRectMBS.Zero (an empty rectangle) if columnIndex lies outside the range of valid column indices for the receiver.

You can use this method to update a single column more efficiently than sending the table view a reloadData message.

aTableView.setNeedsDisplayInRect(aTableView.rectOfColumn(column))

Feedback, Comments & Corrections

NSTableViewMBS.rectOfRow(row as Integer) as NSRectMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 9.1 Yes No No Yes, macOS only No
Function: Returns the rectangle containing the row at a given index.
Notes: Returns the rectangle containing the row at rowIndex. Returns NSRectMBS.Zero (an empty rectangle) if rowIndex lies outside the range of valid row indices for the receiver.

Feedback, Comments & Corrections

NSTableViewMBS.reloadData
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 8.4 Yes No No Yes, macOS only No
Function: Marks the receiver as needing redisplay, so it will reload the data for visible cells and draw the new values.
Notes: This method forces redraw of all the visible cells in the receiver. If you want to update the value in a single cell, column, or row, it is more efficient to use frameOfCellAtColumn(), rectOfColumn(), or rectOfRow() in conjunction with setNeedsDisplayInRect(). If you just want to update the scroller, use noteNumberOfRowsChanged; if the height of a set of rows changes, use noteHeightOfRowsWithIndexesChanged().

See also:

Feedback, Comments & Corrections

NSTableViewMBS.reloadData(rowIndexes as NSIndexSetMBS, columnIndexes as NSIndexSetMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 17.1 Yes No No Yes, macOS only No
Function: Reloads the data for only the specified rows and columns.
Notes:
rowIndexes: The indexes of the rows to update.
columnIndexes: The indexes of the columns to update.

For cells that are visible, the appropriate dataSource and delegate methods are called and the cells are redrawn.
For tables that support variable row heights, the row height is not re-queried from the delegate; it is your responsibility to invoke noteHeightOfRowsWithIndexesChanged if a row height change is required.

For NSView-based table views, this method drops the view-cells in the table row, but not the NSTableRowView instances.

See also:

Feedback, Comments & Corrections

NSTableViewMBS.removeRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 17.1 Yes No No Yes, macOS only No
Function: Removes the rows using the specified animation.
Notes:
indexes: An index set containing the rows to remove.
animationOptions: The animation displayed during the insert. See NSTableViewAnimationOptions for the possible values that can be combined using the bitwise OR operator.

This method deletes from the table the rows represented at indexes and automatically decreases numberOfRows by the count of indexes.
The row indexes should be with respect to the current state displayed in the table view, and not the final state, because the specified rows do not exist in the final state.
Calling this method multiple times within the same beginUpdates and endUpdates block is allowed, and changes are processed incrementally.
Changes are processed incrementally as the insertRowsAtIndexes, removeRowsAtIndexes, and the moveRowAtIndex methods are called. It is acceptable to delete row 0 multiple times, as long as there is still a row available.

NSCell-based table views must first call beginUpdates before calling this method.

Feedback, Comments & Corrections

NSTableViewMBS.removeTableColumn(column as NSTableColumnMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 8.4 Yes No No Yes, macOS only No
Function: Removes a given column from the receiver.

Feedback, Comments & Corrections

NSTableViewMBS.rowAtPoint(p as NSPointMBS) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 9.1 Yes No No Yes, macOS only No
Function: Returns the index of the row a given point lies in.
Notes: Returns the index of the row aPoint lies in, or –1 if aPoint lies outside the receiver's bounds.

See also:

Feedback, Comments & Corrections

NSTableViewMBS.rowAtPoint(x as Double, y as Double) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 9.1 Yes No No Yes, macOS only No
Function: Returns the index of the row a given point lies in.
Notes: Returns the index of the row aPoint lies in, or –1 if aPoint lies outside the receiver's bounds.

See also:

Feedback, Comments & Corrections

NSTableViewMBS.rowForView(view as NSViewMBS) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 17.1 Yes No No Yes, macOS only No
Function: Returns the index of the row for the specified view.
Notes:
view: The view for which to retrieve the row.

Returns the index of the row containing to view. This method returns -1 if the view is not in the table view. This method may also return -1 if the row containing the view is being animated away, such as during the deletion of a row.

This method is typically called in the action method for an NSButton (or NSControl) to find out what row (and column) the action should be performed on.
The implementation is O(n) where n is the number of visible rows, so this method should generally not be called within a loop.

Feedback, Comments & Corrections

NSTableViewMBS.rowsInRect(rect as NSRectMBS) as NSRangeMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 17.1 Yes No No Yes, macOS only No
Function: Returns a range of indexes for the rows that lie wholly or partially within the vertical boundaries of the specified rectangle.
Notes:
Rect: A rectangle in the coordinate system of the table view.

Returns a range of indexes for the table view’s rows that lie wholly or partially within the horizontal boundaries of aRect. If the width or height of aRect is 0, this method returns an NSRange whose length is 0.

The location of the range is the index of the first row in the rectangle, and the length is the number of rows that lie in the rectangle.

Feedback, Comments & Corrections

NSTableViewMBS.rowViewAtRow(row as Integer, makeIfNecessary as Boolean) as NSViewMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 17.1 Yes No No Yes, macOS only No
Function: Returns a row view at the specified index, creating one if necessary.
Notes:
row: The row index.
makeIfNecessary: True if a view is required, NO if you want to update properties on a view, if one is available.

Returns an instance, or subclass, of NSTableRowView. Returning nil is also valid if makeIfNecessary is false and the view did not exist.

This method first attempts to return a currently displayed view in the visible area. If there is no visible view, and makeIfNecessary is true, a prepared temporary view is returned. If makeIfNecessary is false, and the view is not visible, nil is returned.
In general, makeIfNecessary should be true if you require a resulting view, and false if you want to update properties on a view only if it is available (generally this means it is visible).
An exception is thrown if row falls outside of the number of rows in the table (numberOfRows). The returned result should generally not be held onto for longer than the current run loop cycle. It’s better to call rowViewAtRow whenever a view is required.

Feedback, Comments & Corrections

NSTableViewMBS.scrollColumnToVisible(column as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 8.4 Yes No No Yes, macOS only No
Function: Scrolls the receiver and header view horizontally in an enclosing NSClipView so the column specified by columnIndex is visible.

Feedback, Comments & Corrections

NSTableViewMBS.scrollRowToVisible(row as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 8.4 Yes No No Yes, macOS only No
Function: Scrolls the receiver vertically in an enclosing NSClipView so the row specified by rowIndex is visible.

Feedback, Comments & Corrections

NSTableViewMBS.ScrollToLine(Line as Integer, Animated as Boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 16.0 Yes No No Yes, macOS only No
Function: Scrolls to line.
Notes:
If animated is true, the scroll is animated.
The line is centered in the middle of the viewable area if possible.

Feedback, Comments & Corrections

NSTableViewMBS.selectAll
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 8.4 Yes No No Yes, macOS only No
Function: Selects all rows or all columns, according to whether rows or columns were most recently selected.
Notes: If the table allows multiple selection, this action method selects all rows or all columns, according to whether rows or columns were most recently selected. If nothing has been recently selected, this method selects all rows. If this table doesn't allow multiple selection, this method does nothing.

Feedback, Comments & Corrections

NSTableViewMBS.selectColumnIndexes(indexes as NSIndexSetMBS, extend as boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 9.1 Yes No No Yes, macOS only No
Function: Sets the column selection using indexes.
Notes: f the extend flag is false the selected columns are specified by indexes. If extend is true, the columns indicated by indexes are added to the collection of already selected columns, providing multiple selection.

Feedback, Comments & Corrections

NSTableViewMBS.selectedColumnIndexes as NSIndexSetMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 9.1 Yes No No Yes, macOS only No
Function: Returns an index set containing the indexes of the selected columns.
Notes: Returns an index set containing the indexes of the selected columns.

Feedback, Comments & Corrections

NSTableViewMBS.selectedRowIndexes as NSIndexSetMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 9.1 Yes No No Yes, macOS only No
Function: Returns an index set containing the indexes of the selected rows.
Notes: Available in Mac OS X v10.3 and later.

Feedback, Comments & Corrections

NSTableViewMBS.selectRowIndexes(indexes as NSIndexSetMBS, extend as boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 9.1 Yes No No Yes, macOS only No
Function: Sets the row selection using indexes.
Notes:
If the extend flag is false the selected rows are specified by indexes. If extend is true, the rows indicated by indexes are added to the collection of already selected rows, providing multiple selection.

Available in Mac OS X v10.3 and later.

Feedback, Comments & Corrections

NSTableViewMBS.setDraggingSourceOperationMask(mask as Integer, isLocal as Boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 17.1 Yes No No Yes, macOS only No
Function: Sets the default operation mask returned by draggingSourceOperationMaskForLocal to mask.
Notes:
mask: The drag operation mask. See NSDragOperation for the supported values.
isLocal: True if the destination is the same application, otherwise false. In either case the specified mask value is archived and used.

Feedback, Comments & Corrections

NSTableViewMBS.setDropRow(row as Integer, dropOperation as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 17.1 Yes No No Yes, macOS only No
Function: Retargets the proposed drop operation.
Notes:
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.

Feedback, Comments & Corrections

NSTableViewMBS.setSortDescriptor(sortDescriptor as NSSortDescriptorMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 14.2 Yes No No Yes, macOS only No
Function: Sets the receiver's sort descriptors.
Notes:
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.

Feedback, Comments & Corrections

NSTableViewMBS.setSortDescriptors(sortDescriptors() as NSSortDescriptorMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 14.2 Yes No No Yes, macOS only No
Function: Sets the receiver's sort descriptors.
Notes:
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.

Feedback, Comments & Corrections

NSTableViewMBS.sizeLastColumnToFit
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 8.4 Yes No No Yes, macOS only No
Function: Resizes the last column if there's room so the receiver fits exactly within its enclosing clip view.

Feedback, Comments & Corrections

NSTableViewMBS.sizeToFit
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 8.4 Yes No No Yes, macOS only No
Function: Changes the width of columns in the receiver so all columns are visible.
Notes: All columns are resized to the same size, up to a column's maximum size. This method then invokes tile.

Feedback, Comments & Corrections

NSTableViewMBS.sortDescriptors as NSSortDescriptorMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 14.2 Yes No No Yes, macOS only No
Function: Returns the receiver’s sort descriptors.

Feedback, Comments & Corrections

NSTableViewMBS.tableColumns as NSTableColumnMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 9.6 Yes No No Yes, macOS only No
Function: Returns an array containing the the NSTableColumn objects in the receiver.
Notes: The array returned by tableColumns contains all receiver's columns, including those that are hidden.

Feedback, Comments & Corrections

NSTableViewMBS.tableColumnWithIdentifier(identifier as string) as NSTableColumnMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 9.6 Yes No No Yes, macOS only No
Function: Returns the NSTableColumn object for the first column whose identifier is equal to a given object.
Notes: 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.

Feedback, Comments & Corrections

NSTableViewMBS.tile
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 8.4 Yes No No Yes, macOS only No
Function: Properly sizes the receiver and its header view and marks it as needing display.
Notes: Also resets cursor rectangles for the header view and line scroll amounts for the NSScrollView object.

Feedback, Comments & Corrections

NSTableViewMBS.unhideRowsAtIndexes(indexes as NSIndexSetMBS, animationOptions as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 17.1 Yes No No Yes, macOS only No
Function: Unhides the specified table rows.
Notes:
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.

Feedback, Comments & Corrections

Previous items Next items

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




Links
MBS Xojo Plugins