• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSBox with a NSPopUpButton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSBox with a NSPopUpButton
      • From: "Sean McBride" <email@hidden>
    • Re: NSBox with a NSPopUpButton
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: loading French strings being in English language
  • Next by Date: Re: NSBox with a NSPopUpButton
  • Previous by thread: Re: draw NSAttributedstring with transparency
  • Next by thread: Re: NSBox with a NSPopUpButton
  • Index(es):
    • Date
    • Thread