Have a way to I block hide the NSMenu after click.
Thanks.
No, I've written several menubar apps and I've found the only way to disable menu-closing is to subclass NSMenuItem and do your own event handling. Unfortunately that also means you have to use a custom view, do your own title drawing, menu highlighting and "flash" animation.
Another option is to switch to a view based menu item. Then in your view class, respond to - (void) mouseUp:(NSEvent*) event
and implement your custom behavior. The menu will not close on the click, as the event is no longer forwarded up the responder chain to the menu item.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With