On Jun 28, 2011, at 10:00 PM, Bernard Desgraupes wrote:

> Hi,
> 
> I'd like to know if there is a way of inserting an icon instead of a menu 
> title in the menu bar. I'm not speaking of the system status bar, but simply 
> of my application's menus. In Carbon, I used to use SetMenuTitleIcon(): so 
> the question is "is there an equivalent of SetMenuTitleIcon in Cocoa" ?
> 
> Thanks for any clue on this matter, I can't find anything on the web,
> Bernard

Sure. The title of each NSMenu is in fact a NSMenuItem and it has a -setImage: 
method that you can call. You can also do this in Interface Builder by 
selecting the menu, selects its underlying NSMenuItem and then choose which 
image you want directly in the inspector.

Marcus

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to