Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSSplitViewMBS class.
NSSplitViewMBS.addArrangedSubview(view as NSViewMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacCocoa Plugin | 23.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If the view isn’t a subview of the split view, calling this method adds it to the split view’s subviews array.
Some examples using this method:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacCocoa Plugin | 23.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
When you call this method, the split view’s subviews resize proportionally; the relative sizes of the subviews don’t change.
The default implementation of this method resizes subviews proportionally so that the ratio of heights (when using horizontal dividers) or widths (when using vertical dividers) doesn’t change, even though the absolute sizes change.
Call this method on split views where you’ve added or removed subviews to reestablish the consistency of subview placement.
This method invalidates the cursor when it is over a divider, ensuring the cursor is always of the correct type during and after resizing animations.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacCocoa Plugin | 23.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
On success the handle property is not zero.
See also:
NSSplitViewMBS.Constructor(Handle as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacCocoa Plugin | 23.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The handle is casted to a NSSplitView and the plugin retains this handle.
See also:
NSSplitViewMBS.Constructor(left as double, top as double, width as double, height as double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacCocoa Plugin | 23.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
On success the handle property is not zero.
See also:
NSSplitViewMBS.holdingPriorityForSubview(subviewIndex as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacCocoa Plugin | 23.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The priority is the manner that the split view subviews use to maintain their width (for a vertical split view) or height (for a horizontal split view). During a split view resize, subviews with higher priorities maintain their sizes before subviews with lower priorities. The subview with the lowest priority is the first to gain additional thickness if the split view grows or shrinks.
(Read and Write computed property)
NSSplitViewMBS.insertArrangedSubview(view as NSViewMBS, index as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacCocoa Plugin | 23.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If the view is already an arranged view, calling this method moves the view to the specified index in the arrangedSubviews array. This change doesn’t affect the view’s index in the split view’s subviews array.
If the view isn’t a subview of the split view, calling this method adds it to the split view’s subviews array.
NSSplitViewMBS.isSubviewCollapsed(view as NSViewMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacCocoa Plugin | 23.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
subview: The subview in the split view.
Returns true if subview is in a collapsed state; otherwise, false.
NSSplitViewMBS.maxPossiblePositionOfDividerAtIndex(dividerIndex as Integer) as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacCocoa Plugin | 23.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
dividerIndex: The index of the divider.
Returns a number that specifies the maximum possible position of the divider.
The position is possible because the bounds of the split view and the current position of other dividers dictate it. Allowable positions result from letting the delegate apply constraints to the possible positions.
You can invoke this method to determine the range of values that you can pass to setPosition. You can also invoke it from delegate methods like constrainSplitPosition to implement relatively complex behaviors that depend on the current state of the split view.
The result of invoking this method when you haven’t invoked adjustSubviews, and the subview frames are invalid, is undefined.
NSSplitViewMBS.minPossiblePositionOfDividerAtIndex(dividerIndex as Integer) as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacCocoa Plugin | 23.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
dividerIndex: The index of the divider.
Return a number that specifies the minimum possible position of the divider.
The position is possible because the bounds of the split view and the current position of other dividers dictate it. Allowable positions result from letting the delegate apply constraints to the possible positions.
You can invoke this method to determine the range of values that you can pass to setPosition(). You can also invoke it from delegate methods like constrainSplitPosition to implement relatively complex behaviors that depend on the current state of the split view.
The result of invoking this method when you haven’t invoked adjustSubviews, and the subview frames are invalid, is undefined.
NSSplitViewMBS.removeArrangedSubview(view as NSViewMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacCocoa Plugin | 23.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If the value of arrangesAllSubviews is false, calling this method doesn’t remove the view as a subview; it remains in the split view’s subviews array.
If you remove a view as a subview (either by calling removeFromSuperview() or removing it from the split view’s subviews array), the system automatically removes the view as an arranged subview.
NSSplitViewMBS.setPosition(position as double, dividerIndex as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacCocoa Plugin | 23.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
dividerIndex: The index of the divider.
One of the views adjacent to the divider may collapse because the method’s default implementation assumes a person is dragging the divider to the new location. The Auto Layout system collapses the view if it can’t satisfy the view’s constraints — typically imposed by its delegate — with the divider’s new location.
NSSplitView doesn’t invoke this method.
The items on this page are in the following plugins: MBS MacCocoa Plugin.