Hi,
I have a hover button in my window, implemented tracking area and mouseEntered:
and mouseExited: to achieve this (the button draws a border around it on mouse
entered).
Now sometimes I need to put a window size transparent view over the entire
window and block mouse events from filtering through it to the views under it.
For this I have implemented the following methods in transparent view:
- (void)mouseDown:(NSEvent*)event {}
- (void)mouseDragged:(NSEvent*)event {}
- (void)mouseUp:(NSEvent*)event {}
- (void)mouseEntered:(NSEvent *)theEvent {}
- (void)mouseExited:(NSEvent *)theEvent {}
- (void)mouseMoved:(NSEvent *)theEvent {}
- (BOOL)acceptsFirstResponder {
return YES;
}
So the mouse click etc are not passing through, but the hover button under it
still shows hovering effect by drawing the border.
Please help.
Regards,
Navneet
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]