Re: NSView clickable area
Re: NSView clickable area
- Subject: Re: NSView clickable area
- From: Shawn Erickson <email@hidden>
- Date: Sat, 17 Nov 2007 22:37:52 -0800
On Nov 17, 2007, at 10:30 PM, Christian Schmitz wrote:
Hi,
my NSView in the Statusitem bar does not get mouse events on areas
which
are transparent. Users are complaining about this.
If you want to know how the bahavior is, just thing about if you click
on the menubar clock and the menu there would only open if you hit the
black text. If you hit the space between the letters or inside the
letters, you won't open the menu.
How do I make a NSView to handle events on the whole size?
And how does the system know where I don't have it transparent?
Seems like if I draw it all in red using fillrect, I get all events I
expect. But if there is just a small icon, the space around is
ignored.
Somehow the system seems to thing it needs to watch on the alpha mask.
Well pretty much all of Mac OS X hit detection works considering
opacity. I bet you can use a white fill at like 5% or a little more to
get the OS to do the hit detection you want without making it visible
to the user.
Note on Leopard I don't see this behavior nor do I recall it on Tiger
but I will take your word for it.
-Shawn
_______________________________________________
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