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
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com