Re: [Leopard] Spotlight/Help-like menu item
Re: [Leopard] Spotlight/Help-like menu item
- Subject: Re: [Leopard] Spotlight/Help-like menu item
- From: Lee Ann Rucker <email@hidden>
- Date: Thu, 15 Jan 2009 15:53:24 -0800
I've tried this - non-public APIs don't scare me - but when I set an
event handler on the contentView, I didn't get
kEventControlGetFrameMetrics. I only get it on the contentView's
superview, but it doesn't have one at awakeFromNib time. I have to
wait until it gets a kEventControlOwningWindowChanged and add it
then, but that's too late for the first time the menu appears -
though it does work fine after that.
Is there something I'm missing?
On Jan 26, 2008, at 9:59 PM, Eric Schlegel wrote:
On Jan 26, 2008, at 8:45 PM, Pierre Bernard wrote:
Trouble starts when I want my view to draw a background (like the
blue background used by Spotlight), I find that there remains a
white area above and below my view which is drawn by the menu
itself. What I am after is a way to get rid of that border.
The Help menu removes that white border by installing a Carbon event
handler for kEventControlGetFrameMetrics on the menu content view
(HIMenuGetContentView) and returning a top metric of zero pixels.
Unfortunately there's no public way to get the MenuRef from an NSMenu,
so I'm not sure this approach is viable if you only want to use public
API.
-eric
_______________________________________________
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
_______________________________________________
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