NSBox with a NSPopUpButton
NSBox with a NSPopUpButton
- Subject: NSBox with a NSPopUpButton
- From: Eric Gorr <email@hidden>
- Date: Fri, 23 Jul 2010 14:20:29 -0400
In the HIG, it says:
Group boxes can be untitled or titled. If titled, they may have text-only titles, checkbox titles, or pop-up menu titles. If the group box uses a checkbox title, the items in the group box should be active only when the checkbox is selected.
Group boxes are available in Interface Builder. To create one using Application Kit programming interfaces, use the NSBox class.
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.
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.
It seems strange that the HIG would say this is ok, but then have the NSBox API not support it....or, have I missed something?
_______________________________________________
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