• 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
Width of a menu (or menu item)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Width of a menu (or menu item)


  • Subject: Width of a menu (or menu item)
  • From: Jeffrey Mattox <email@hidden>
  • Date: Sun, 2 Mar 2003 00:22:35 -0600

I have a popup menu that drops down from the status menu. I need to compute the optimal screen location before showing the menu. All I need to know is how wide the menu will be (e.g., 200 pixels) prior to the menu appearing.

Given:

NSMenu *theMenu = ... // already contains the menu items

is there a way to get the width of that menu?

If not, is there a way to get the width of an NSMenuIItem?

Jeff
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: More on releasing NSImages
  • Next by Date: Re: changing name of application in application menu
  • Previous by thread: Re: fastest way to round NSNumber
  • Next by thread: NSPoint
  • Index(es):
    • Date
    • Thread