• 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 clicking through to superview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView clicking through to superview


  • Subject: Re: NSView clicking through to superview
  • From: Ron Fleckner <email@hidden>
  • Date: Mon, 28 Sep 2009 12:58:36 +1000


On 28/09/2009, at 12:36 PM, PCWiz wrote:

Hi,

I have a transparent black NSView that I layer over my window using NSView's addSubview method. This works fine, but I want to make it so that all clicks are captured by the NSView, because right now I can click through to the superview underneath. I've already tried returning NO for acceptsFirstMouse and it has no effect.

Thanks


Not sure if this will help, but NSWindow has a -setIgnoresMouseEvents: method which, if you give it NO as the parameter, will allow transparent areas of the window to get mouse downs. What I'm not sure about is if this will allow your transparent subview to get those clicks.


If this doesn't work, you could put your transparent view into a child window of the first window.

HTH,
Ron
_______________________________________________

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 clicking through to superview (From: PCWiz <email@hidden>)

  • Prev by Date: Re: OR compositing operation?
  • Next by Date: Can an app query the values in its own Info.plist?
  • Previous by thread: NSView clicking through to superview
  • Next by thread: Re: NSView clicking through to superview
  • Index(es):
    • Date
    • Thread