• 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: NSMenuItem and images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMenuItem and images


  • Subject: Re: NSMenuItem and images
  • From: "Hamish Allan" <email@hidden>
  • Date: Mon, 28 Apr 2008 15:00:50 +0100

On Mon, Apr 28, 2008 at 2:48 PM, Adam R. Maxwell <email@hidden> wrote:

>  I just don't trust that method, since the main menu bar has always looked
> taller than a menu item, and it could easily change without changing menu
> item height.  What I want is something akin to -[NSMenuView
> rectOfItemAtIndex:].

A quick screen capture confirms (on my unmodified 10.5.2) that the
menu bar is 21 pixels high whereas each item is only 19 pixels high.

But rectOfItemAtIndex: looks like a pretty good bet, actually...

"The drawing rectangle may not be the same width or height as the
actual menu and in fact is typically smaller to account for borders
drawn by the menu view."

I'd say the height without borders etc is exactly the height you'd
want to draw your image at.

Hamish
_______________________________________________

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

  • Follow-Ups:
    • Re: NSMenuItem and images
      • From: "Adam R. Maxwell" <email@hidden>
References: 
 >NSMenuItem and images (From: Kristopher Matthews <email@hidden>)
 >Re: NSMenuItem and images (From: Seth Willits <email@hidden>)
 >Re: NSMenuItem and images (From: "Adam R. Maxwell" <email@hidden>)
 >Re: NSMenuItem and images (From: Kristopher Matthews <email@hidden>)
 >Re: NSMenuItem and images (From: "Hamish Allan" <email@hidden>)
 >Re: NSMenuItem and images (From: Kristopher Matthews <email@hidden>)
 >Re: NSMenuItem and images (From: "Adam R. Maxwell" <email@hidden>)
 >Re: NSMenuItem and images (From: "Hamish Allan" <email@hidden>)
 >Re: NSMenuItem and images (From: "Adam R. Maxwell" <email@hidden>)

  • Prev by Date: Re: NSMenuItem and images
  • Next by Date: Re: NSMenuItem and images
  • Previous by thread: Re: NSMenuItem and images
  • Next by thread: Re: NSMenuItem and images
  • Index(es):
    • Date
    • Thread