Re: Setting image one pulldown popup button
Christiaan Hofman <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On Dec 6, 2009, at 21:16, Matt Neuburg wrote: > On or about 12/4/09 12:00 PM, thus spake "[email protected]" > <[email protected]>: > >> Date: Fri, 4 Dec 2009 12:36:10 +0100 >> From: Christiaan Hofman <[email protected]> >> Subject: Setting image one pulldown popup button >> >> After trying long and many times, I am unable to set the image on a pulldown >> NSPopUpButton in code (it works in IB). >> >> I am aware that -setImage: does nothing. According to the docs, the image is >> taken from the first menu item, so I set the image on the item at index 0. I >> also played with other settings (in particular image position NSImageOnly and >> unbordered) but that has no effect. Also the order in which I set the image, >> add the menu item, set pullsdown, etc does not seem to make any effect. >> Neither does calling sycnhronizeTitleAndSelectedItem (though that should not >> be relevant anyway). I never see the image. >> >> So does anyone know what I need to do to get the image in a popup? >> > > Apple's MenuMadness example does not help here? Works okay on my machine... > Perhaps I'm not understanding what the problem is. m. > I'm using essentially the same code as the sample code and it does nothing for me: I get an empty popup button. Christiaan