• 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: "Adam R. Maxwell" <email@hidden>
  • Date: Mon, 28 Apr 2008 06:21:00 -0700


On Apr 28, 2008, at 5:28 AM, Kristopher Matthews wrote:

I gave that a try, but it seems to always return 0.

It's documented to return 0 for all menus except -[NSApp mainMenu]. Maybe all other items are the same height as the main menu?


After googling, it's a seemingly common problem that's been around for while.

That said [NSMenuView menuBarHeight] does work (returning 22) - but is marked deprecated in the documentation.

I don't think NSMenuView is used for drawing anymore, and it's not available in 64 bit. Since Carbon isn't available in 64 bit either, GetMenuHeight also isn't much good. Oh well...at least other apps will look funny too if it ever changes :).


--
adam

On Apr 28, 2008, at 7:12 AM, Hamish Allan wrote:

On Mon, Apr 28, 2008 at 12:39 PM, Kristopher Matthews <email@hidden> wrote:

I don't see any way to do it, but my initial concern is that user could
modify their system to change that height - maybe for visually impaired
users.

You could perhaps use [[yourPopupButton menu] menuBarHeight]?

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: "Hamish Allan" <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>)

  • Prev by Date: Re: How is "Apple + Ctrl + D" implemented?
  • Next by Date: Re: How is "Apple + Ctrl + D" implemented?
  • Previous by thread: Re: NSMenuItem and images
  • Next by thread: Re: NSMenuItem and images
  • Index(es):
    • Date
    • Thread