Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

NSPopUpButtonMBS class

Super class: NSButtonMBS

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa Controls MBS MacControls Plugin 10.0 Yes No No Yes, macOS only No
Function: An NSPopUpButton object controls a pop-up menu or a pull-down menu from which a user can select an item.
// get cocoa view for the popupmenu
dim p as NSPopUpButtonMBS = PopupMenu1.NSPopUpButtonMBS

// find a menu entry
dim it as NSMenuItemMBS = p.itemAtIndex(0)

// get a picture
dim pic as Picture = LogoMBS(500)
dim img as new NSImageMBS(pic)
img.setSize 16,16

// and assign icon
it.image = img
The NSPopUpButton class defines objects that implement the pop-up and pull-down menus of the graphical user interface.

An NSPopUpButton object uses an NSPopUpButtonCell object to implement its user interface.

Note that while a menu is tracking, adding, removing, or changing items on the menu is not reflected.
Subclass of the NSButtonMBS class.

Feedback, Comments & Corrections

Arrow Position Constants

Constant Value Description
NSPopUpArrowAtBottom 2 Arrow is drawn at the edge of the button, pointing toward the preferredEdge.
NSPopUpArrowAtCenter 1 Arrow is centered vertically, pointing toward the preferredEdge.
NSPopUpNoArrow 0 Does not display any arrow in the receiver.

Super class NSButtonMBS

Super class NSControlMBS

Super class NSViewMBS

Window Order Constants

Constant Value Description
NSWindowAbove 1 Moves the window above the indicated window.
NSWindowBelow -1 Moves the window below the indicated window.
NSWindowOut 0 Moves the window off the screen.

Super class NSResponderMBS

This class has no sub classes.

Some methods using this class:

Some properties using for this class:

Some examples which use this class:

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

NSPopUpButtonCellMBS   -   NSPredicateMBS

MBS Xojo Plugins