Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSTabViewMBS class.

NSTabViewMBS.addTabViewItem(tabViewItem as NSTabViewItemMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Adds the tab item specified by tabViewItem.

tabViewItem: The tab view item to be added.

The item is added at the end of the array of tab items, so the new tab appears on the right side of the view.

NSTabViewMBS.allowsTruncatedLabels as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether if the receiver allows truncating for labels that don't fit on a tab.

Value is true if the receiver allows truncating for labels that don't fit on a tab, otherwise false.

The default is true.
When truncating is allowed, the tab view inserts an ellipsis, if necessary, to fit a label in the tab.
(Read and Write computed property)

NSTabViewMBS.Constructor

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

On success the handle property is not zero.

See also:

NSTabViewMBS.Constructor(Handle as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates an object based on the given NSTabView handle.
Example
dim t as new NSTabViewMBS(0, 0, 100, 100)
dim v as new NSTabViewMBS(t.handle)

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

The handle is casted to a NSTabView and the plugin retains this handle.

See also:

NSTabViewMBS.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 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new tab view with the given size and position.
Example
dim x as new NSTabViewMBS(0, 0, 100, 100)

On success the handle property is not zero.

See also:

NSTabViewMBS.contentRect as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the rectangle describing the content area of the receiver.

This area does not include the space required for the receiver's tabs or borders (if any).

NSTabViewMBS.controlSize as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The size of the receiver.

Use NSRegularControlSize, NSSmallControlSize or NSMiniControlSize.
(Read and Write computed property)

NSTabViewMBS.controlTint as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The tab view's control tint.

Use NSDefaultControlTint, NSBlueControlTint, NSGraphiteControlTint or NSClearControlTint.
(Read and Write computed property)

NSTabViewMBS.drawsBackground as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether if the receiver draws a background color when the tab view type is NSNoTabsNoBorder.

True if the receiver draws a background color when the tab view type is NSNoTabsNoBorder, otherwise false.

If the receiver uses bezeled edges or a line border, the appropriate background color for that border is used.
(Read and Write computed property)

NSTabViewMBS.font as NSFontMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The font for tab label text.

Tab height is adjusted automatically to accommodate a new font size. If the view allows truncating, tab labels are truncated as needed.
(Read and Write computed property)

NSTabViewMBS.indexOfTabViewItem(tabViewItem as NSTabViewItemMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the index of the specified item in the tab view.

The zero-based index of tabViewItem, or [NSNotFound] if the item is not found.

NSTabViewMBS.indexOfTabViewItemWithIdentifier(identifier as Variant) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the index of the item that matches the specified identifier. identifier, or NSNotFound (-1) if the item is not found.

Returns nil on any error.

NSTabViewMBS.insertTabViewItem(tabViewItem as NSTabViewItemMBS, atIndex as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Inserts tabViewItem into the receiver's array of tab view items at index.

tabViewItem: The tab view item to be added.
index: The index at which to insert the tab view item. The index parameter is zero-based.

NSTabViewMBS.minimumSize as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the minimum size necessary for the receiver to display tabs in a useful way.

You can use the value returned by this method to limit how much a user can resize a tab view.

NSTabViewMBS.numberOfTabViewItems as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the number of items in the receiver's array of tab view items.

NSTabViewMBS.removeTabViewItem(tabViewItem as NSTabViewItemMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Removes the item specified by tabViewItem from the receiver's array of tab view items.

NSTabViewMBS.selectedTabViewItem as NSTabViewItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Selects the specified tab view item.

NSTabViewMBS.selectFirstTabViewItem

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This action method selects the first tab view item.

NSTabViewMBS.selectLastTabViewItem

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This action method selects the last tab view item.

NSTabViewMBS.selectNextTabViewItem

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This action method selects the next tab view item in the sequence.

If the currently visible item is the last item in the sequence, this method does nothing, and the last page remains displayed.

NSTabViewMBS.selectPreviousTabViewItem

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This action method selects the previous tab view item in the sequence.

If the currently visible item is the first item in the sequence, this method does nothing, and the first page remains displayed.

NSTabViewMBS.selectTabViewItem(tabViewItem as NSTabViewItemMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the tab view item for the currently selected tab.

Returns the currently selected tab view item, or nil if no item is selected.

NSTabViewMBS.selectTabViewItemAtIndex(index as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Selects the tab view item specified by index.

The index parameter is base 0.

NSTabViewMBS.selectTabViewItemWithIdentifier(identifier as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Selects the tab view item specified by identifier.

NSTabViewMBS.tabViewItemAtIndex(index as Integer) as NSTabViewItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the tab view item at index in the tab view's array of items.

index: The index at which to insert the tab view item. The index parameter is zero-based.

Returns the tab view item at the specified index.

Some examples using this method:

NSTabViewMBS.tabViewItemAtPoint(x as Double, y as Double) as NSTabViewItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the tab view item at the specified point.

Returns the tab view item under the hit point, or nil if no tab view item is under that location.
You can use this method to find a tab view item based on a user's mouse click.

NSTabViewMBS.tabViewItems as NSTabViewItemMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the receiver's array of tab view items.

A tab view keeps an array containing one tab view item for each tab in the view.

NSTabViewMBS.tabViewType as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The tab type for the receiver.

Use constants: NSTopTabsBezelBorder, NSLeftTabsBezelBorder, NSBottomTabsBezelBorder, NSRightTabsBezelBorder, NSNoTabsBezelBorder, NSNoTabsLineBorder or NSNoTabsNoBorder.
(Read and Write computed property)

Some examples using this property:

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


The biggest plugin in space...