Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSMenuItemMBS class.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Menus | MBS MacBase Plugin | 7.2 | ✅ Yes | ❌ No | ❌ No | ❌ No |
This event is coming from the Cocoa event system. What you can do is a bit limited when using GUI functions from Xojo. To avoid some redraw errors, you may want to start a timer and let your Xojo code run a millisecond after the menu code has finished.
Depending on what you do, you can see the menu not redrawing properly (staying highlighted) and crashes if the Xojo code modifies some global Cocoa states.
NSMenuItemMBS.validateMenuItem(menuItem as NSMenuItemMBS) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Menus | MBS MacBase Plugin | 13.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Return true to enable menuItem, false to disable it.
This is needed to modify the menuitem for a menu attached to a NSSearchFieldMBS.
Menuitem parameter is often the same as self, but for a searchfield menu, self is the template and menuitem parameter the actual menu item.
The items on this page are in the following plugins: MBS MacBase Plugin.