• 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 clickable area
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSView clickable area
      • From: email@hidden (Christian Schmitz)
References: 
 >NSView clickable area (From: email@hidden (Christian Schmitz))

  • Prev by Date: NSView clickable area
  • Next by Date: Plugins Utilizing Core Data NSManagedObjectContext
  • Previous by thread: NSView clickable area
  • Next by thread: Re: NSView clickable area
  • Index(es):
    • Date
    • Thread