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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to