Re: NSView clicking through to superview
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