Custom image for popup button?

Is it possible in AS Studio to somehow use a custom image to fire a popup menu–instead of the bordered/non-bordered arrows? Or, in lieu of that, any way to get the size of a bordered popup small enough so that it just displays the blue portion of the arrows? The only example of this effect I can think of is in the iTunes “Get Info” window, where the popup button for the Genre menu seems to be a non-standard popup button.

Thanks.

Hi,

I am not sure I understood what you meant but FWIW, I have done something that might be akin to this.

When I set up the pop-up button in the IB, I simply grab the handle on the left side of the pop-up button and drag the box with the default label to the right, leaving me with only the bidirectional button or the pop-down button. You can play around with the technique until you find the right frame that you want.

Good luck!

archseed :slight_smile:

That’s my trouble. I can’t get the size of the frame as small as I’d like without distortion in the bordered popup icon or extra empty space to the left of an unbordered popup icon; the extra space is causing me clip and overlap problems. What I’d like to do is the ability of assigning a popup menu to some other object, like a button with an image, but I am not aware if this is possible.

Matt Gemel has an open source NSButton subclass with the requested behaviour (Image + Popup menu) on his site: http://mattgemmell.com/source/ → look for PopUpImage (and/or ImagePopUpButton)

Dominik,

Perfect! Thanks! Much obliged.