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