Reputation: 7725
I need to make a popup or pull down menu in Cocoa that will contain either an image or an image with text as the representation of the item. Can anyone suggest a way I could do this programatically?
Upvotes: 2
Views: 1825
Reputation: 243156
Any sort of menu in Cocoa, whether it's in the menubar, part of an NSPopUpButton
, or a combobox, uses NSMenu
to display its menu. The NSMenu
displays a list of NSMenuItem
s. Each NSMenuItem
has a -[NSMenuItem setImage:]
method. Have you tried that?
Upvotes: 16