Re: update nspopupbutton at use-time
Re: update nspopupbutton at use-time
- Subject: Re: update nspopupbutton at use-time
- From: Martin Hewitson <email@hidden>
- Date: Fri, 26 Aug 2011 19:02:36 +0200
Excellent. Thank you!
Martin
On 26, Aug, 2011, at 06:06 PM, Jens Alfke wrote:
>
> 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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer
Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: email@hidden
WWW: http://www.aei.mpg.de/~hewitson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
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