• 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
Re: update nspopupbutton at use-time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: update nspopupbutton at use-time


  • Subject: Re: update nspopupbutton at use-time
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 26 Aug 2011 09:06:45 -0700

On Aug 26, 2011, at 8:15 AM, Martin Hewitson wrote:

> I would like to populate the list in an NSPopupButton just as the user clicks but before the menu is shown. So I'd like an NSPopupButton delegate message -popupWillAppear: or something like that.

I knew there was a way to do this but it took me a minute to find it…
Listen for NSPopUpButtonCellWillPopUpNotification sent by the button’s cell. At that time you can modify the contents of the menu right before it gets displayed.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: update nspopupbutton at use-time
      • From: Shane Stanley <email@hidden>
    • Re: update nspopupbutton at use-time
      • From: Martin Hewitson <email@hidden>
References: 
 >update nspopupbutton at use-time (From: Martin Hewitson <email@hidden>)

  • Prev by Date: Re: Sharing a persistent store between iOS and Mac
  • Next by Date: Re: rightMouseDown: never called in NSView subclass
  • Previous by thread: update nspopupbutton at use-time
  • Next by thread: Re: update nspopupbutton at use-time
  • Index(es):
    • Date
    • Thread