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
Adds a view as an arranged split pane.

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:

NSSplitViewMBS.adjustSubviews

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 23.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Adjusts the sizes of the split view’s subviews so they (plus the dividers) fill the split view.

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.

NSSplitViewMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 23.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new split view with size 100/100 and position 0/0
Example
dim t as new NSDatePickerMBS

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
Creates an object based on the given NSSplitView handle.
Example
dim t as new NSSplitViewMBS(0, 0, 100, 100)
dim v as new NSSplitViewMBS(t.handle)

MsgBox str(v.Bounds.Width)+" x "+str(v.Bounds.Height)

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
Creates a new split view with the given size and position.
Example
dim x as new NSSplitViewMBS(0, 0, 100, 100)

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 of the subview’s width or height when resizing.

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
Adds a view as an arranged split pane at the specified index.

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
Returns whether the specified view is in a collapsed state.

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
Returns the maximum possible position of the divider at the specified index.

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
Returns the minimum possible position of the divider at the specified index.

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
Removes a view as an arranged split pane.

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
Updates the location of a divider you specify by index.

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.


The biggest plugin in space...