Re: NSView clicking through to superview
Re: NSView clicking through to superview
- Subject: Re: NSView clicking through to superview
- From: Mike Abdullah <email@hidden>
- Date: Mon, 28 Sep 2009 10:35:06 +0100
You want to read up on how event handling in Cocoa works. When you
click, the window is sending events to your overlay view. But if that
view does not handle the event itself, it forwards it on to the next
view below the mouse. So, you need to override the required event
handling methods in your custom view to stop them forwarding the event
on.
Mike.
On 28 Sep 2009, at 03:36, 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
_______________________________________________
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