Re: Menu Title Icon in Cocoa
Re: Menu Title Icon in Cocoa
- Subject: Re: Menu Title Icon in Cocoa
- From: Marcus Karlsson <email@hidden>
- Date: Wed, 29 Jun 2011 01:02:49 +0200
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 (email@hidden)
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:
This email sent to email@hidden