• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Menu Title Icon in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Menu Title Icon in Cocoa (From: Bernard Desgraupes <email@hidden>)

  • Prev by Date: Re: Reading Adobe Photoshop header, Obj-C
  • Next by Date: Re: Reading Adobe Photoshop header, Obj-C
  • Previous by thread: Menu Title Icon in Cocoa
  • Next by thread: how to get viewable text position after scroll a UITextView
  • Index(es):
    • Date
    • Thread