views:

110

answers:

1

I want to make a type of popupbutton sort of like the action button on OSX. I need to make the button have two images makeup the representation of the button (the icon for the button and the downward facing disclosure triangle next to it). I was thinking maybe I could add the second image as a subview of the button but it seems that there should be a simpler way to do this. Any ideas?

+2  A: 

Make an NSPopUpButton whose pullsDown is set to YES (Type of “Pull Down” in IB) and whose image is set to the image named NSImageNameActionTemplate (“NSActionTemplate” in IB).

Peter Hosey
That would just give me a button with the action button logo. I need to be able to combine and image with the disclosure down arrow. So for example if the image of my button was a + then I want want to have the button show up as a + followed by the image of the disclosure down arrow.
Mike2012
Michael Minerva: Read my answer more thoroughly. A *pop-up* button, *whose `pullsDown` is set to `YES`*, will do exactly what you want.
Peter Hosey