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

Re: NSView in NSMenuItem


  • Subject: Re: NSView in NSMenuItem
  • From: Peter Ammon <email@hidden>
  • Date: Wed, 2 Jan 2008 13:32:55 -0800


On Jan 2, 2008, at 5:24 AM, Hendrik Holtmann wrote:

Hi,

I am using the new setView method of Leopard to set the NSView of an NSMenuItem. However I ran into two problems I can't solve at the moment:
1) When I set the view it works, but there is always a border around the view. E.g. when I have an NSView with a solid background it does not fill the whole NSMenuItem. There is always a border on top and bottom of the NSView.

Yes, there is an area above and below the menu item region which is drawn by the menu itself. There is no way to remove this at present.


2) I am trying to add a second NSMenuItem containing an NSView that has got a height of about 200px. When its added to the NSMenu the first NSMenuItem resizes as well to a height of 200px. How can I prevent this?

The most likely cause of this is that you have added the same view to multiple menu items. You should be sure to remove the view from previous menu items with [item setView:nil] before adding the view to a new item.


I hope this helps,
-Peter

_______________________________________________

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: 
 >NSView in NSMenuItem (From: Hendrik Holtmann <email@hidden>)

  • Prev by Date: To read and write in a binary file
  • Next by Date: Re: Status item using custom view not responding to clicks (Follow up)
  • Previous by thread: NSView in NSMenuItem
  • Next by thread: Re: Scripting Bridge && filteredArrayUsingPredicate
  • Index(es):
    • Date
    • Thread