Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Next items

NSTableViewMBS.addTableColumn(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: Adds a given column as the last column of the receiver.

Feedback, Comments & Corrections

NSTableViewMBS.beginUpdates
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: Begins a group of updates for the table view.
Notes:
For NSView-based table views, multiple row changes—that is, insertions, deletions, and moves—are animated simultaneously by surrounding calls to those method calls with beginUpdates and endUpdates. These methods are nestable.
The selected rows are maintained during the series of insertions, deletions, moves, and scrolling. If a selected row is deleted, a selection changed notification occurs after removeRowsAtIndexes is called.
It is not necessary to call beginUpdates and endUpdates if only one insertion, deletion, or move is occurring and the table view is an NSView-based table view. When using an NSCell-based table view, you must surround any insertion, deletion, or move in an update block for animations to occur.
The main reason for doing a batch update of changes to a table view is to avoid having the table animate unnecessarily.
Note that these methods should be called to reflect changes in your model; they do not make any underlying model changes.

For NSCell-based table views, it is required to call beginUpdates if you want to animate the insertRowsAtIndexes, removeRowsAtIndexes, and moveRowAtIndex.

Feedback, Comments & Corrections

NSTableViewMBS.canDragRowsWithIndexes(rowIndexes as NSIndexSetMBS, mouseDownPoint as NSPointMBS) 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: Returns a Boolean value indicating whether the table view allows dragging the rows at with the drag initiated at the specified point.
Notes:
rowIndexes: The row indexes to drag.
mouseDownPoint: The location where the drag was initiated.

Returns no to disallow the drag.

Feedback, Comments & Corrections

NSTableViewMBS.columnAtPoint(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 column a given point lies in.
Notes: Returns the index of the column aPoint lies in, or –1 if aPoint lies outside the receiver's bounds.

See also:

Feedback, Comments & Corrections

NSTableViewMBS.columnAtPoint(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 column a given point lies in.
Notes: Returns the index of the column aPoint lies in, or –1 if aPoint lies outside the receiver's bounds.

See also:

Feedback, Comments & Corrections

NSTableViewMBS.columnForView(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 column index for the specified view.
Notes:
view: The view for which to retrieve the column.

Returns the index of the column containing view in the tableColumns array. 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 of 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.columnIndexesInRect(rect as NSRectMBS) 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 the indexes of the receiver's columns that intersect the specified rectangle.
Notes: Available in Mac OS X v10.5 and later.

Feedback, Comments & Corrections

NSTableViewMBS.columnWithIdentifier(identifier as string) as Integer
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 index of the first column in the receiver whose identifier is equal to a given identifier.
Notes: Returns the index of the first column in the receiver whose identifier is equal to anObject (when compared using isEqual:) or –1 if no columns are found with the specified identifier.

Feedback, Comments & Corrections

NSTableViewMBS.Constructor
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: Creates a new table view with size 100/100 and position 0/0
Example:
dim t as new NSTableViewMBS
Notes: On success the handle property is not zero.

See also:

Feedback, Comments & Corrections

NSTableViewMBS.Constructor(Handle as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 10.3 Yes No No Yes, macOS only No
Function: Creates an object based on the given NSTableView handle.
Example:
dim t as new NSTableViewMBS(0, 0, 100, 100)
dim v as new NSTableViewMBS(t.handle)

MsgBox str(v.Bounds.Width)+" x "+str(v.Bounds.Height)
Notes: The handle is casted to a NSTableView and the plugin retains this handle.

See also:

Feedback, Comments & Corrections

NSTableViewMBS.Constructor(left as Double, top as Double, width as Double, height as Double)
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: Creates a new table view with the given size and position.
Example:
dim x as new NSTableViewMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.

See also:

Feedback, Comments & Corrections

NSTableViewMBS.deselectAll
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: Deselects all selected rows or columns if empty selection is allowed; otherwise does nothing.

Feedback, Comments & Corrections

NSTableViewMBS.deselectColumn(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: Deselects the column at a given index if it's selected.
Notes: Colunn is from 0 to numberOfColumns-1.

Feedback, Comments & Corrections

NSTableViewMBS.deselectRow(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: Deselects the row at a given index if it's selected.
Notes: Deselects the row at rowIndex if it's selected, regardless of whether empty selection is allowed.

Feedback, Comments & Corrections

NSTableViewMBS.Destructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 9.2 Yes No No Yes, macOS only No
Function: The destructor.
Notes: REALbasic calls this destructor automatically.

Feedback, Comments & Corrections

NSTableViewMBS.dragImageForRowsWithIndexes(dragRows as NSIndexSetMBS, tableColumns() as NSTableColumnMBS, theEvent as NSEventMBS, byref dragImageOffset as NSPointMBS) as NSImageMBS
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: Computes and returns an image to use for dragging.
Notes:
dragRows: An index set containing the row indexes that should be in the image.
tableColumns: An array of table columns that should be in the image.
dragEvent: The event that initiated the drag.
dragImageOffset: An in/out parameter specifying the offset of the cursor in the image, the default value is NSZeroPoint. Returning NSZeroPoint causes the cursor to be centered.

Returns an NSImage containing a custom image for the specified rows and columns participating in the drag.

Feedback, Comments & Corrections

NSTableViewMBS.edit(column as Integer, row as Integer, selectit as boolean)
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: Edits the cell at columnIndex and rowIndex, selecting its entire contents if flag is true.
Notes:
This method is invoked automatically in response to user actions; you should rarely need to invoke it directly.

This method scrolls the receiver so that the cell is visible, sets up the field editor, and sends selectWithFrame() and editWithFrame() to the field editor's NSCell object with the NSTableView as the text delegate.

The row at rowIndex must be selected prior to calling editColumn:row:withEvent:select:, or an exception will be raised.

Feedback, Comments & Corrections

NSTableViewMBS.endUpdates
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: Ends the group of updates for the table view.
Notes: Ends the group of updates for the table view. This method, like beginUpdates, is nestable. See beginUpdates for details.

Feedback, Comments & Corrections

NSTableViewMBS.frameOfCellAtColumnRow(column as Integer, row as Integer) as NSRectMBS
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 rectangle locating the cell that lies at the intersection of the specified column and row.
Notes:
column: The index in the tableColumns array of the column containing the cell whose rectangle you want.
row: The index of the row containing the cell whose rectangle you want.

Returns a rectangle locating the cell that lies at the intersection of columnIndex and rowIndex. This method returns NSRectMBS.Zero if columnIndex or rowIndex is greater than the number of columns or rows in the table view.

You can use this method to update a single cell more efficiently than sending the table view a reloadData message using reloadData function.
The result of this method is used in a drawWithFrame:inView: message to the table column's data cell. You can subclass and override this method to customize the frame of a particular cell. However, never return a frame larger than the default implementation returns.
The default frame is computed to have a height equal to the rectOfRow: for rowIndex, minus the half intercellSpacing height on the top and half on the bottom. The width of frame is equal to the with of the table column minus half the intercellSpacing width on the left, and half on the right.

Feedback, Comments & Corrections

NSTableViewMBS.hiddenRowIndexes 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: The indexes of all hidden table rows.
Notes: The value of this property is an index set containing the indexes of any hidden table rows. Table rows may be hidden by invoking the hideRowsAtIndexes method. Some drag-and-drop operations also result in hidden rows.

Feedback, Comments & Corrections

NSTableViewMBS.hideRowsAtIndexes(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: Hides the specified table rows.
Notes:
indexes: An index set containing indexes of the rows to be hidden.
rowAnimation: An animation effect to be applied when the rows are hidden.

Use this method when you no longer want the data to be visible to the user, but you don’t want to permanently remove the data. Hidden table rows have a height of zero and cannot be selected by the user. However, if a selected table row is hidden, it will remain selected.
Hiding a table row causes the didRemoveRowView delegate method to be invoked.

Feedback, Comments & Corrections

NSTableViewMBS.indicatorImageInTableColumn(column as NSTableColumnMBS) as NSImageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacControls Plugin 9.2 Yes No No Yes, macOS only No
Function: The indicator image of a given table column.
Notes:
An indicator image is an arbitrary (small) image that is rendered on the right side of the column header. An example of its use is in Mail to indicate the sorting direction of the currently sorted column in a mailbox.
(Read and Write computed property)

Feedback, Comments & Corrections

NSTableViewMBS.insertRowsAtIndexes(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: Inserts the rows using the specified animation.
Notes:
indexes: The final positions of the new rows to be inserted.
animationOptions: The animation displayed during the insert. See NSTableViewAnimationOptions for the possible values that can be combined using the bitwise OR operator.

The numberOfRows in the table view is automatically increased by the count of indexes.
Calling this method multiple times within the same beginUpdates and endUpdates block is allowed, and changes are processed incrementally.

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

Feedback, Comments & Corrections

NSTableViewMBS.isColumnSelected(column as Integer) as boolean
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: Returns a Boolean value that indicates whether the column at a given index is selected.
Notes: column is from 0 to to numberOfColumns.

Feedback, Comments & Corrections

NSTableViewMBS.isRowSelected(row as Integer) as boolean
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: Returns a Boolean value that indicates whether the row at a given index is selected.
Notes: row is from 0 to to numberOfRows.

Feedback, Comments & Corrections

NSTableViewMBS.moveColumn(column as Integer, toIndex as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacControls Plugin 9.2 Yes No No Yes, macOS only No
Function: Moves the column and heading at a given index to a new given index.
Notes:
columnIndex: The current index of the column to move.
newIndex: The new index for the moved column.

This method raises the ColumnDidMove event.

Feedback, Comments & Corrections

NSTableViewMBS.moveRowAtIndex(oldIndex as Integer, newIndex 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: Moves the specified row to the new row location using animation.
Notes:
oldIndex: Initial row index.
newIndex: New row index.

This is similar to removing a row at oldIndex and inserting it at newIndex, except the same view is used and simply has its position updated to the new location.
Changes happen incrementally as they are sent to the table, so as soon as this method is called the row can be considered moved. However the underlying view is not moved until endUpdates has been called.
This method can be called multiple times within the same beginUpdates and endUpdates block.

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

Feedback, Comments & Corrections

NSTableViewMBS.noteHeightOfRowsWithIndexesChanged(indexSet as NSIndexSetMBS)
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: Informs the table view that the rows specified in indexSet have changed height.
Notes:
indexSet: Index set of rows that have changed their height.

If you implement heightOfRow event this method immediately retiles the table view using the row heights the event provides.

For NSView-based tables, this method will animate. To turn off the animation, create an NSAnimationContext grouping and set the duration to 0. Then call this method and end the grouping.

For NSCell-based tables, this method normally doesn't animate. However, it will animate if you call it inside a beginUpdates/endUpdates block.

Feedback, Comments & Corrections

NSTableViewMBS.noteNumberOfRowsChanged
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: Informs the receiver that the number of records in its data source has changed.
Notes: This method allows the receiver to update the scrollers in its scroll view without actually reloading data into the receiver. It's useful for a data source that continually receives data in the background over a period of time, in which case the table view can remain responsive to the user while the data is received.

Feedback, Comments & Corrections

Next items

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





Links
MBS Xojo Plugins