• 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: NSMenu menuBarHeight is 0?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMenu menuBarHeight is 0?


  • Subject: Re: NSMenu menuBarHeight is 0?
  • From: Jonathan del Strother <email@hidden>
  • Date: Tue, 25 Oct 2005 01:06:58 +0100

On 24 Oct 2005, at 18:18, Scott Thompson wrote:


On Oct 24, 2005, at 10:18 AM, Jonathan del Strother wrote:


I'm trying to find the menu bar height, by calling [[[NSApplication sharedApplication] mainMenu] menuBarHeight]. It's returning 0.

[[NSApplication sharedApplication] mainMenu] is giving me the correct object. [NSMenuView menuBarHeight] returns the correct height, but is apparently deprecated (presumably to make way for the scalable display technology?).

Any suggestions why menuBarHeight is giving me the wrong value?


An interesting question is what behavior are you trying to put into your application where you need to know the main menubar's height. There may be a better way of solving your problem.


My app has a fullscreen mode, where the menubar is hidden. If the mouse cursor moves to the top of the display, I'd like to show the menubar - so I need the menubar height to check where the cursor is in relation to it.


Guess I'll stick with +[NSMenuView menuBarHeight] for now...

Jon

_______________________________________________
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


  • Follow-Ups:
    • Re: NSMenu menuBarHeight is 0?
      • From: Ricky Sharp <email@hidden>
References: 
 >NSMenu menuBarHeight is 0? (From: Jonathan del Strother <email@hidden>)
 >Re: NSMenu menuBarHeight is 0? (From: Scott Thompson <email@hidden>)

  • Prev by Date: SyncServices build issue
  • Next by Date: Re: NSMenu menuBarHeight is 0?
  • Previous by thread: Re: NSMenu menuBarHeight is 0?
  • Next by thread: Re: NSMenu menuBarHeight is 0?
  • Index(es):
    • Date
    • Thread