• 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
Re: NSBox with a NSPopUpButton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSBox with a NSPopUpButton (From: Eric Gorr <email@hidden>)

  • Prev by Date: NSBox with a NSPopUpButton
  • Next by Date: Re: NSPropertyListSerialization and string encoding
  • Previous by thread: NSBox with a NSPopUpButton
  • Next by thread: Re: NSBox with a NSPopUpButton
  • Index(es):
    • Date
    • Thread