Re: NSBox with a NSPopUpButton
Re: NSBox with a NSPopUpButton
- Subject: Re: NSBox with a NSPopUpButton
- From: Kyle Sluder <email@hidden>
- Date: Fri, 23 Jul 2010 11:46:33 -0700
On Jul 23, 2010, at 11:20 AM, Eric Gorr <email@hidden> wrote:
>
> So, what is the best method to create a NSBox with a NSPopUpButton?
>
> I can think of two methods which may work (neither of which I like) :
>
> 1. Create a NSBox and NSPopUpButton and then manually position the NSPopUpButton on the NSBox. This seems like it would be a whole lot more work then should be necessary.
I don't see what's difficult about this. Center it on top of the box, set the autoresize handles appropriately, and you're done. The difficult part is really swapping out the contents of the box, but a tabless NSTabView will do fine here.
This style of UI has pretty much fallen out of fashion anyway, in favor of a toolbar at the top of the panel. It feels so QuickTime 6 Preferences-y.
>
> 2. Subclass NSBox and access _titleCell directly, changing it to NSPopUpButtonCell. Since changing the titleCell directly is not supported by the API, who know what might go wrong in the future.
Yeah, definitely don't do this. I doubt mouse tracking will work correctly anyway.
--Kyle Sluder_______________________________________________
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