Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSOutlineControlMBS control.
Type | Topic | Version |
event | Cocoa Controls | 17.1 |
The control is about to was created and you can initialize it.
In older Xojo versions, this event is named Open.
NSOutlineControlMBS.OtherMouseDown(e as NSEventMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.
NSOutlineControlMBS.OtherMouseDragged(e as NSEventMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.
NSOutlineControlMBS.OtherMouseUp(e as NSEventMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.
NSOutlineControlMBS.pasteboardWriterForItem(item as NSOutlineViewItemMBS) as NSPasteboardItemMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
item: The item for which to return a pasteboard writer.
Returns a NSPasteboardItem object.
If this method is implemented, then writeItems is not called.
NSOutlineControlMBS.persistentObjectForItem(item as NSOutlineViewItemMBS) as Variant
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
item: The item for which to return an archived object.
Returns an archived representation of item. If the item is an archived object, this method may return the item.
When the outline view is saving the expanded items, this method is called for each expanded item, to translate the outline view item to an archived object.
You must implement this method if you are automatically saving expanded items (that is, if autosaveExpandedItems returns true).
NSOutlineControlMBS.RightMouseDown(e as NSEventMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.
NSOutlineControlMBS.RightMouseDragged(e as NSEventMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.
NSOutlineControlMBS.RightMouseUp(e as NSEventMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
This event is called before the normal event processing from Xojo happens. So return true to hide event from Xojo runtime.
NSOutlineControlMBS.rowViewForItem(item as NSOutlineViewItemMBS) as NSTableRowViewMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
item: The item displayed by the returned table row view.
Return an instance or subclass of NSTableRowView. If nil is returned, a NSTableRowView instance is created and used.
This method, if implemented, is only invoked for NSView-based outline views.
NSOutlineControlMBS.ScaleFactorChanged(NewFactor as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Please invalidate any cached bitmaps or other relevant state.
NSOutlineControlMBS.SelectionDidChange(notification as NSNotificationMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
NSOutlineControlMBS.selectionIndexesForProposedSelection(proposedSelectionIndexes as NSIndexSetMBS) as NSIndexSetMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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 willDisplayOutlineCell.
If not implemented or returns nil, the plugin will return proposedSelectionIndexes.
NSOutlineControlMBS.SelectionIsChanging(notification as NSNotificationMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
NSOutlineControlMBS.selectionShouldChangeInOutlineView as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Return true to permit outlineView to change its selection (typically a row being edited), false to deny permission.
For example, if the user is editing a cell and enters an improper value, the delegate can prevent the user from selecting or editing any other cells until a proper value has been entered into the original cell. You can implement this method for complex validation of edited rows based on the values of any of their cells.
NSOutlineControlMBS.setObjectValue(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS, value as Variant)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
object: The new value for the item.
tableColumn: A column in outlineView.
item: An item in the data source in the specified tableColumn of the view.
The item is located in the specified tableColumn of the view.
Do not call reloadData from this method.
NSOutlineControlMBS.shouldCollapseAutoExpandedItemsForDeposited(deposited as Boolean, superResult as Boolean) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
deposited: If true, the drop terminated successfully; if false the drop failed.
Return true if auto-expanded items should return to their original collapsed state; otherwise false.
Implement this event to provide custom behavior. If the target of a drop is not auto-expanded (by hovering long enough) the drop target still gets expanded after a successful drop unless this method returns true. The default implementation returns false after a successful drop.
This method is called in a variety of situations. For example, it is called shortly after the acceptDrop method is called and also if the drag exits the outline view (exiting the view is treated the same as a failed drop). The return value of the acceptDrop method determines the incoming value of the deposited parameter.
NSOutlineControlMBS.shouldCollapseItem(item as NSOutlineViewItemMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
item: The item that should collapse.
Return true to permit outlineView to collapse item, false to deny permission.
You can implement this method to disallow collapsing of specific items. For example, if the first row of your outline view should not be collapsed, your delegate method could contain this line of code:
return rowForItem(item ) <> 0
NSOutlineControlMBS.shouldEdit(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
tableColumn: The table column.
item: The item.
Returns true to permit outlineView to edit the cell specified by tableColumn and item, false to deny permission.
If this method returns true, the cell may still not be editable—for example, if you have set up a custom NSTextFieldCell as a data cell, it must return true for isEditable to allow editing.
You can implement this method to disallow editing of specific cells.
NSOutlineControlMBS.shouldExpandItem(item as NSOutlineViewItemMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSOutlineControlMBS.shouldReorderColumn(columnIndex as Integer, newColumnIndex as Integer) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSOutlineControlMBS.shouldSelectItem(item as NSOutlineViewItemMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSOutlineControlMBS.shouldSelectTableColumn(tableColumn as NSTableColumnMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSOutlineControlMBS.shouldShowCellExpansion(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSOutlineControlMBS.shouldShowOutlineCellForItem(item as NSOutlineViewItemMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSOutlineControlMBS.shouldTrackCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSOutlineControlMBS.shouldTypeSelectForEvent(e as NSEventMBS, searchString as String) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSOutlineControlMBS.sizeToFitWidthOfColumn(Column as Integer) as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSOutlineControlMBS.sortDescriptorsDidChange(oldDescriptors() as NSSortDescriptorMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSOutlineControlMBS.textShouldBeginEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Return true to allow.
NSOutlineControlMBS.textShouldEndEditing(control as NSControlMBS, fieldEditor as NSTextMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Return true to allow.
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 | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSOutlineControlMBS.typeSelectString(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSOutlineControlMBS.updateDraggingItemsForDrag(draggingInfo as NSDraggingInfoMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
draggingInfo: The dragging info object.
NSOutlineControlMBS.validateDrop(info as NSDraggingInfoMBS, proposedItem as NSOutlineViewItemMBS, proposedChildIndex as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSOutlineControlMBS.view(tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS) as NSViewMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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:
NSOutlineControlMBS.willDisplayCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
NSOutlineControlMBS.willDisplayOutlineCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, item as NSOutlineViewItemMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
The internal tile function properly sizes the table view and its header view and marks it as needing display.
NSOutlineControlMBS.writeItems(items() as NSOutlineViewItemMBS, pasteboard as NSPasteboardMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
The items on this page are in the following plugins: MBS MacControls Plugin.