How can I keep an NSPopUpButton open after the user selects a menu item?
How can I keep an NSPopUpButton open after the user selects a menu item?
- Subject: How can I keep an NSPopUpButton open after the user selects a menu item?
- From: Dennis Hartigan-O'Connor <email@hidden>
- Date: Sat, 13 Jun 2009 11:20:33 -0700
I have an NSPopUpButton providing the NSMenu for a status item with a
custom view. The popup button displays a list of links. When the user
selects a link from the list, the link is displayed in the user's
browser (in the background).
Naturally, the menu closes every time the user selects a link.
I would like to change this: I want the menu to stay open while the user
clicks on various links, all of which can be opened in the background.
The menu can then go away when the user clicks elsewhere.
How can this be accomplished? Should I subclass NSMenuItem and intercept
the mouse clicks somehow? Overlay a transparent NSView on the popped-up
menu and, again, intercept the clicks somehow? I make these suggestions
blithely, but I would have trouble implementing either of
these...pointers to the right methods for override would be appreciated.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden