How to ignore events for NSView
How to ignore events for NSView
- Subject: How to ignore events for NSView
- From: Robert Miller <email@hidden>
- Date: Tue, 15 Mar 2005 13:51:08 -0500
Hello,
Does anyone know if there is a way to have a subclass of NSView
ignore events ? I'd like to be able to have an NSView behave as an
'color overlay' in another NSView that may contain other subviews such
that the overlay view is drawn on top of all the other content. This
part can be achieved easily by adding an overlay subview to a main view
so that it gets drawn last, effectively on top of all other views,
however I do not want this overlay view to be recognized as being able
to handle any events , I 'd like it to be completely ignored. I've
found no way to achieve this type of behavior. Here's the scenario:
MainView Custom NSView
Subview A
Subview B
Subview C
....
next insert an overlay view by calling [MainView addSubview:overlay];
so now we have:
MainView Custom NSView
Overlay
Subview A
Subview B
Subview C
....
Overlay will be drawn last on top of all other subviews due to is
ordering in the subviews array.
However as far as any events, particularly mouse events, I'd like the
MainView to behave as if the overlay subview is not there.
Fiddling with the responder status via acceptsFirstResponder, etc. does
not work because the window has already dispatched the mouse click to
overlay regardless if acceptsFirstResponder being NO.
The implementation of this is basically to be able to provide a
'tinted' overlay of the contents of a particular view.
Any ideas or info regarding a possible solution would be greatly
appreciated.
Thanks in advance.
Regards,
Bob M
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden