• 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: How to draw and image and a Title in the same cell of a Menu item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to draw and image and a Title in the same cell of a Menu item


  • Subject: Re: How to draw and image and a Title in the same cell of a Menu item
  • From: Scott Mitchell <email@hidden>
  • Date: Sat, 18 Dec 2004 08:50:30 -0700

Thanks. I figured it out right after sending it. I need to set the menu title and the menu image. Then they both show up.

Thanks anyway. And sorry for bothering anyone.

Thanks,
Scott Mitchell


On Dec 18, 2004, at 8:41 AM, Ricky Sharp wrote:


On Dec 18, 2004, at 9:35 AM, Scott Mitchell wrote:

I have been looking for examples for this but can not seem to find anything. I need to draw an image and text next to the image in a NSMenuItem. This is possible but have not figured out how to do it. Is there any example code available. I have searched Apple site but can't find anything.

If I'm reading this correctly, you'd ultimately have two separate images in the menu item?


Anyhow, you could probably do this with a subclass of NSMenuItemCell. While not a direct example, you could probably leverage the techniques from the following:

/Examples/AppKit/DragNDropOutlineView/

Specifically look at ImageAndTextCell.h/m

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >How to draw and image and a Title in the same cell of a Menu item (From: Scott Mitchell <email@hidden>)
 >Re: How to draw and image and a Title in the same cell of a Menu item (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: How to draw and image and a Title in the same cell of a Menu item
  • Next by Date: Re: How do you receive a BOOL from a method returning BOOL
  • Previous by thread: Re: How to draw and image and a Title in the same cell of a Menu item
  • Next by thread: arch 1.2 and nib files
  • Index(es):
    • Date
    • Thread