• 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: Screen Coordinates of Menu. Use CTM? (was: Give menu keyboard focus)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Screen Coordinates of Menu. Use CTM? (was: Give menu keyboard focus)


  • Subject: Re: Screen Coordinates of Menu. Use CTM? (was: Give menu keyboard focus)
  • From: Seth Willits <email@hidden>
  • Date: Sun, 09 Oct 2011 23:01:13 -0700

On Oct 9, 2011, at 10:41 PM, Jerry Krinock wrote:

>> The status icon/view in the menu bar is in a window. You can thus get that window's coordinates by [[[statusItem view] window] frame].
>
> Thank you, Seth.  I wish it were so.
>
> But [statusItem view] returns nil for me.  And the documentation explains that the 'view' of a status item is an optional custom view which overrides the regular menu behavior.

Correct. If you have a normal menu for your status item, you can set a custom view and then popup the menu manually at the right location. The only annoying thing is the top corners are rounded and not square, but it does work. In my case, I have to have a custom view, but needed a normal menu so that's what I had to do.

Graham's suggestion should work otherwise. Just make a view of the standard size and you're good to go.


--
Seth Willits



_______________________________________________

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: 
 >Give a menu keyboard focus - in code (From: Jerry Krinock <email@hidden>)
 >Re: Give a menu keyboard focus - in code (From: Jerry Krinock <email@hidden>)
 >Re: Give a menu keyboard focus - in code (From: Jerry Krinock <email@hidden>)
 >Screen Coordinates of Menu. Use CTM? (was: Give menu keyboard focus) (From: Jerry Krinock <email@hidden>)
 >Re: Screen Coordinates of Menu. Use CTM? (was: Give menu keyboard focus) (From: Graham Cox <email@hidden>)
 >Re: Screen Coordinates of Menu. Use CTM? (was: Give menu keyboard focus) (From: Seth Willits <email@hidden>)
 >Re: Screen Coordinates of Menu. Use CTM? (was: Give menu keyboard focus) (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Screen Coordinates of Menu. Use CTM? (was: Give menu keyboard focus)
  • Next by Date: Re: Give a menu keyboard focus – in code
  • Previous by thread: Re: Screen Coordinates of Menu. Use CTM? (was: Give menu keyboard focus)
  • Next by thread: Give a menu keyboard focus – in code
  • Index(es):
    • Date
    • Thread