Setting image one pulldown popup button
Christiaan Hofman <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
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? thanks, Christiaan