• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How can I keep an NSPopUpButton open after the user selects a menu item?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How can I keep an NSPopUpButton open after the user selects a menu item?
      • From: Graham Cox <email@hidden>
    • Re: How can I keep an NSPopUpButton open after the user selects a menu item?
      • From: Michael Ash <email@hidden>
  • Prev by Date: Re: Coming up with ideas
  • Next by Date: Re: SQLite -- same DB, different machines -> different results
  • Previous by thread: Setting Up Apple Help
  • Next by thread: Re: How can I keep an NSPopUpButton open after the user selects a menu item?
  • Index(es):
    • Date
    • Thread