• 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
Prevent NSPopupButton from showing its menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Prevent NSPopupButton from showing its menu


  • Subject: Prevent NSPopupButton from showing its menu
  • From: Eric Blanpied <email@hidden>
  • Date: Mon, 16 Oct 2006 21:47:57 -0700

I've got a subclass of NSPopupButton that I need to only show its menu when a modifier key is held down. I can see a few ways to detect the click (override mouseup(), use NSPopUpButtonWillPopUpNotification, etc.), but I'm not sure how to prevent the menu from showing when the modifier key isn't down. I suppose I could have the menu be empty and add the appropriate items only if the key is down, but I'm not at all sure that's the smart approach.

Any advice on both issues (best way to detect click, best way to prevent menu) would be great.

Thanks!

-eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Localized string coming displaying in All Caps
  • Next by Date: Re: Localized string coming displaying in All Caps
  • Previous by thread: Re: Localized string coming displaying in All Caps
  • Next by thread: Core Data, NSArrayController and remove:
  • Index(es):
    • Date
    • Thread