Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSPopUpButtonCellMBS class.

NSPopUpButtonCellMBS.altersStateOfSelectedItem as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean value that indicates if the pop-up button links the state of the selected menu item to the current selection.

When the value of this property is true (which is the default value), the state of the selected item is set to NSOnState. When the value of this property is false, the items in the menu are left alone. When you change the value of this property, the state of the currently selected item is updated appropriately.
Note that this property affects only pop-up buttons (it is ignored for pull-down menus).
(Read and Write property)

NSPopUpButtonCellMBS.arrowPosition as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The position of the arrow displayed on the button.

When the value of this property is NSPopUpNoArrow, the control displays no arrow. NSPopUpArrowAtCenter displays the arrow centered horizontally within the cell and NSPopUpArrowAtBottom displays the arrow at the edge of the cell. This property is used with preferredEdge to determine the exact location and orientation of the arrow.
This property applies to only bezel style and borderless pop-up buttons.
(Read and Write property)

NSPopUpButtonCellMBS.autoenablesItems as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean value that indicates if the button automatically enables and disables its items every time a user event occurs.

When the value of this property is true, the button automatically enables and disables items. The default value is true. For more information about enabling and disabling menu items, see NSMenuValidation.
(Read and Write property)

NSPopUpButtonCellMBS.indexOfSelectedItem as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The index of the item last selected by the user.

The value of this property is the index of the selected item, or -1 if no item is selected.
(Read only property)

NSPopUpButtonCellMBS.lastItem as NSMenuItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The last item in the menu.

(Read only property)

NSPopUpButtonCellMBS.menu as NSMenuMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The pop-up button’s associated menu.

(Read and Write property)

NSPopUpButtonCellMBS.numberOfItems as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The number of items in the menu.

(Read only property)

NSPopUpButtonCellMBS.preferredEdge as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The edge of the cell from which the menu should pop out when screen conditions are restrictive.

At display time, if attaching the menu to the preferred edge would cause part of the menu to be obscured, the pop-up button may use a different edge. If no preferred edge is set, the pop-up button uses the bottom edge by default, which is NSMaxYEdge for flipped views or NSMinYEdge for unflipped views. Additional values for this property include NSMinXEdge and NSMaxXEdge.
The exact location of the arrow is determined by examining the value of this property and arrowPosition.

If the arrow position is NSPopUpArrowAtCenter, the arrow stays in the center of the button and the value of this property determines which edge the arrow points to: NSMinXEdge points to the left, NSMaxYEdge points to the top, NSMaxXEdge points to the right, and NSMinYEdge points to the bottom.

If the arrow position is NSPopUpArrowAtBottom, the value of this property determines which edge at which the arrow is placed: NSMinXEdge places the arrow at the center of the left side, pointing to the left, NSMinYEdge places the arrow at bottom right corner, pointing up, NSMaxXEdge places the arrow at the center of the right side, pointing to the right, and NSMaxYEdge places the arrow at the bottom right corner, pointing down.
(Read and Write property)

NSPopUpButtonCellMBS.pullsDown as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean value that indicates the behavior of the button’s menu.

When the value of this property is true, the menu behaves like a pull-down menu; when the value is false, it behaves like a pop-up menu. If you use this property to change the menu type from a pop-up menu to a pull-down menu, and the cell alters the state of its selected items, the state of the currently selected item is set to NSOffState before the menu type is changed.
(Read and Write property)

NSPopUpButtonCellMBS.selectedItem as NSMenuItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The menu item last selected by the user.

The value of this property is the menu item that is currently selected, or nil if no item is selected. The last selected menu item is the one that was highlighted when the user released the mouse button. It is possible for a pull-down menu’s selected item to be its first item.
(Read only property)

NSPopUpButtonCellMBS.titleOfSelectedItem as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The title of the item last selected by the user.

The value of this property is the title of the selected menu item, or an empty string if no item is selected.
(Read only property)

NSPopUpButtonCellMBS.usesItemFromMenu as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 17.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean value that indicates if the control uses an item from the menu for its own title.

When the value of this property is true, a pull-down menu uses the title of the first menu item, and a pop-up menu uses the title of the currently selected menu (if no menu item is selected, the pop-up button displays no item and is drawn empty). When the value is false, the menu item set with menuItem (NSMenuItemMBS) is always displayed. The default value is true.
(Read and Write property)

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


The biggest plugin in space...