Re: NSView in NSMenuItem
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