• 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: Pull Down Toolbar Item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pull Down Toolbar Item


  • Subject: Re: Pull Down Toolbar Item
  • From: j o a r <email@hidden>
  • Date: Mon, 29 Dec 2008 08:23:13 -0800


On Dec 29, 2008, at 7:00 AM, Carmen Cerino Jr. wrote:

In order to create the item, I started with a subclass of NSToolbarItem that has a NSPopupButton for its view.


Any particular reason to use a subclass? You should be able to use a plain NSTollbarItem, and set the pop-up button using "-setView:".


The issue I am running into is that the image is not being fully displayed (see screen capture below). Increasing the size of the toolbar item solves the issue, but causes the item to be out of alignment with the rest of the items.


As you have noted, you need to set the max and min sizes of a toolbar item that contains a custom view. In order for your items to line up, you probably also need to make sure that they're of similar size. The standard size for image style toolbar items is 32x32px.


I am just curious as to how they got it positioned more to the bottom right of the image vs. the center. My guess is that they possibly drew the triangle themselves.


I think that you're supposed to be able to use the "arrowPosition" and "preferredEdge" properties of the pop-up button cell to control where the arrow shows up, but I think that Xcode is probably using custom artwork in this case.


j o a r


_______________________________________________

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: Pull Down Toolbar Item
      • From: "Carmen Cerino Jr." <email@hidden>
References: 
 >Pull Down Toolbar Item (From: "Carmen Cerino Jr." <email@hidden>)

  • Prev by Date: Pull Down Toolbar Item
  • Next by Date: Re: Google Maps Class / Library
  • Previous by thread: Pull Down Toolbar Item
  • Next by thread: Re: Pull Down Toolbar Item
  • Index(es):
    • Date
    • Thread