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 (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

Reply via email to