Re: Popup Menus (was: XCode's Special Buttons)
Re: Popup Menus (was: XCode's Special Buttons)
- Subject: Re: Popup Menus (was: XCode's Special Buttons)
- From: Jerry Krinock <email@hidden>
- Date: Tue, 2 Mar 2010 10:41:43 -0800
On 2010 Mar 01, at 15:50, Kevin Wojniak wrote:
> It's probably an NSPopUpButton subclass, with a custom NSPopUpButtonCell subclass to change its appearance. I don't think IB lets you create custom popup buttons that small, so you'd probably have to either use a standard button or a custom view, and then set the class name and finish up any other configurations in the subclass's awakeFromNib/initWithFrame/initWithCoder/etc methods.
Could be. There are other ways to do this too. You can pretty much pop a menu onto any view, any old NSButton in particular. If you're using the 10.6 SDK, it's even easier, thanks to
-[NSMenu popUpMenuPositioningItem:atLocation:inView].
See latest AppKit Release Notes.
I've attached a little code (10.5 SDK) which you might find interesting.
Attachment:
PopUpAnywhere.zip
Description: Zip archive
_______________________________________________
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