Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items

NSOutlineControlMBS.shouldExpandItem(item as NSOutlineViewItemMBS) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Returns a Boolean value that indicates whether the outline view should expand a given item.
Notes:
item: The item that should expand.

Returns true to permit outlineView to expand item, false to deny permission.
You can implement this method to disallow expanding of specific items.

Feedback, Comments & Corrections

NSOutlineControlMBS.shouldReorderColumn(columnIndex as Integer, newColumnIndex as Integer) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Sent to the delegate 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.

Returns 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.

Feedback, Comments & Corrections

NSOutlineControlMBS.shouldSelectItem(item as NSOutlineViewItemMBS) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Returns a Boolean value that indicates whether the outline view should select a given item.
Notes:
item: The item.

Return true to permit outlineView to select item, false to deny permission.

You implement this event to disallow selection of particular items.
For better performance and finer grain control over the selection, use dataCell.

Feedback, Comments & Corrections

NSOutlineControlMBS.shouldSelectTableColumn(tableColumn as NSTableColumnMBS) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Returns a Boolean value that indicates whether the outline view should select a given table column.
Notes:
tableColumn: The table column.

Return true to permit outlineView to select tableColumn, false to deny permission.

You can implement this method to disallow selection of specific columns.

Feedback, Comments & Corrections

NSOutlineControlMBS.shouldShowCellExpansion(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Invoked to allow the delegate to control cell expansion for a specific column and item.
Notes:
tableColumn: A table column in the outline view.
item: An item in the outline view.

Returns true to allow an expansion tooltip to appear in the column tableColumn for item item, otherwise false.

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.

Feedback, Comments & Corrections

NSOutlineControlMBS.shouldShowOutlineCellForItem(item as NSOutlineViewItemMBS) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Returns whether the specified item should display the outline cell (the disclosure triangle).
Notes:
item: An item in the outline view.

Returns true if the outline cell should be displayed, otherwise false.

Returning false causes frameOfOutlineCellAtRow to return NSZeroRect, hiding the cell. In addition, the row will not be collapsible by keyboard shortcuts.
This method is called only for expandable rows.

Feedback, Comments & Corrections

NSOutlineControlMBS.shouldTrackCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Returns a Boolean value that indicates whether a given cell should be tracked.
Notes:
cell: The cell used to display item item in column tableColumn
tableColumn: A table column in the outline view.
item: An item in the outline view.

Returns true if the cell should be tracked for the item item in column tableColumn, otherwise false.

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 a button cell in a table which does not change the selection, but can still be clicked on and tracked.

Feedback, Comments & Corrections

NSOutlineControlMBS.shouldTypeSelectForEvent(e as NSEventMBS, searchString as String) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Returns a Boolean value that indicates whether type select should proceed for a given event and search string.
Notes:
e: The event that caused the message to be sent.
searchString: The string for which searching is to proceed. The search string is nil if no type select has begun.

Return true if type select should proceed, otherwise false.

Generally, this method will be called from keyDown and the event will be a key event.

Feedback, Comments & Corrections

NSOutlineControlMBS.sizeToFitWidthOfColumn(Column as Integer) as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Invoked to allow the delegate 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, NSOutlineView 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.

Feedback, Comments & Corrections

NSOutlineControlMBS.sortDescriptorsDidChange(oldDescriptors() as NSSortDescriptorMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Invoked by an outline view to notify the data source that the descriptors changed and the data may need to be resorted.
Notes:
oldDescriptors: An array that contains the previous descriptors.

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 does not itself manage them, you can get outlineView's current sort descriptors by sending it a sortDescriptors message.

Feedback, Comments & Corrections

NSOutlineControlMBS.textShouldBeginEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: The event called to decide whether text editing should be allowed.
Notes: Return true to allow.

Feedback, Comments & Corrections

NSOutlineControlMBS.textShouldEndEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: The event called to decide whether ending text editing should be allowed.
Notes: Return true to allow.

Feedback, Comments & Corrections

NSOutlineControlMBS.toolTipForCell(cell as NSCellMBS, byref rect as NSRectMBS, tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS, mouseLocation as NSPointMBS) as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: When the cursor pauses over a given cell, the value returned from this method is displayed in a tooltip.
Notes:
cell: The cell for which to generate a tooltip.
rect: The proposed active area of the tooltip. To control the default active area, you can modify the rect parameter. By default, rect is computed as cell.drawingRectForBounds(cellFrame).
tc: The table column that contains cell.
item: The item for which to display a tooltip.
mouseLocation: The current mouse location in view coordinates.

If you don’t want a tooltip at that location, return nil or the empty string.

Feedback, Comments & Corrections

NSOutlineControlMBS.typeSelectString(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Returns the string that is used for type selection for a given column and item.
Notes:
tableColumn: A table column in the outline view.
item: An item in the outline view.

Return the string that is used for type selection. You may want to change what is searched for based on what is displayed, or simply return nil for that row and/or column to not be searched

Implement this method if you want to control the string that is used for type selection. You may want to change what is searched for based on what is displayed, or simply return nil to specify that the given row and/or column should not be searched. By default, all cells with text in them are searched.

The default value when this delegate method is not implemented is:
outlineView.preparedCellAtColumn(tableColumn, outlineView.rowForItem(item)).stringValue
and you can return this value from the event if you wish.

Feedback, Comments & Corrections

NSOutlineControlMBS.updateDraggingItemsForDrag(draggingInfo as NSDraggingInfoMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Implement this method to enable the table to update dragging items as they are dragged over the view.
Notes: draggingInfo: The dragging info object.

Feedback, Comments & Corrections

NSOutlineControlMBS.validateDrop(info as NSDraggingInfoMBS, proposedItem as NSOutlineViewItemMBS, proposedChildIndex as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Used by an outline view to determine a valid drop target.
Notes:
info: An object that contains more information about this dragging operation.
item: The proposed parent.
index: The proposed child location.

Returns a value that indicates which dragging operation the data source will perform.

Based on the mouse position, the outline view will suggest a proposed drop location. The data source may “retarget” a drop if desired by calling setDropItem and returning something other than NSDragOperationNone. You may choose to retarget for various reasons (for example, for better visual feedback when inserting into a sorted position).
Implementation of this method is optional.

Feedback, Comments & Corrections

NSOutlineControlMBS.view(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as NSViewMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Implemented to return the view used to display the specified item and column.
Notes:
tableColumn: The table column, or nil if the row is a group row.
item: The item displayed by the returned view.

Return the view to display the specified column and row. Returning nil is acceptable, in which case a view is not shown at that location.

This method is required if you wish to use NSView objects instead of NSCell objects for the cells within an outline view. Cells and views cannot be mixed within the same outline view.
It is recommended that the implementation of this method first call the NSTableView method makeViewWithIdentifier passing, respectively, the tableColumn parameter’s identifier and self as the owner to attempt to reuse a view that is no longer visible. The frame of the view returned by this method is not important, and is automatically set by the outline view.
The view's properties should be properly set up before returning the result.
When using Cocoa bindings, this method is optional if at least one identifier has been associated with the table view at design time. If this method is not implemented, the outline view automatically calls makeViewWithIdentifier with the tableColumn parameter’s identifier and the outline view’s delegate as parameters, to attempt to reuse a previous view or automatically unarchive a prototype associated with the table view.
The autoresizingMask of the returned view is automatically set to NSViewHeightSizable to resize properly on row height changes.

See also:

Feedback, Comments & Corrections

NSOutlineControlMBS.willDisplayCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Informs the delegate that the cell specified by the column and item will be displayed.
Notes:
cell: The cell.
tableColumn: The table column.
item: The item.

You can implement this method to modify cell to provide further setup for the cell in tableColumn and item. It is not safe to do drawing inside this method—you should only set up state for cell.

Feedback, Comments & Corrections

NSOutlineControlMBS.willDisplayOutlineCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Informs the delegate that an outline view is about to display a cell used to draw the expansion symbol.
Notes:
cell: The cell.
tableColumn: The table column.
item: The item.

Informs the event that outlineView is about to display cell—an expandable cell (a cell that has the expansion symbol)—for the column and item specified by tableColumn and item. The delegate can modify cell to alter its display attributes.
This method is not invoked when outlineView is about to display a non-expandable cell.

Feedback, Comments & Corrections

NSOutlineControlMBS.willTile
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: The tableview will tile.
Notes: The internal tile function properly sizes the table view and its header view and marks it as needing display.

Feedback, Comments & Corrections

NSOutlineControlMBS.writeItems(items() as NSOutlineViewItemMBS, pasteboard as NSPasteboardMBS) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No No No
Function: Returns a Boolean value that indicates whether a drag operation is allowed.
Notes:
items: An array of the items participating in the drag.
pasteboard: The pasteboard to which to write the drag data.

Returns true if the drag operation is allowed, otherwise false.

Invoked by outlineView after it has been determined that a drag should begin, but before the drag has been started.
To refuse the drag, return false. To start a drag, return true and place the drag data onto the pboard (data, owner, and so on). The drag image and other drag-related information will be set up and provided by the outline view once this call returns with true.

Feedback, Comments & Corrections

Previous items

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




Links
MBS Xojo Plugins