Platforms to show: All Mac Windows Linux Cross-Platform

Back to PopupMenu class.

PopupMenu.NSPopUpButtonMBS as NSPopUpButtonMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Controls MBS MacControls Plugin 10.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a NSPopUpButtonMBS object for the given control.
Example
// 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

This way you can manipulate Cocoa controls directly.

Some examples using this method:

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


The biggest plugin in space...