• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Mouse tracking under a transparent view still working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mouse tracking under a transparent view still working


  • Subject: Mouse tracking under a transparent view still working
  • From: Navneet Kumar <email@hidden>
  • Date: Sun, 11 Jan 2015 11:42:39 +0530

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@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


  • Follow-Ups:
    • Re: Mouse tracking under a transparent view still working
      • From: Markus Spoettl <email@hidden>
  • Prev by Date: Re: Cursor above siblings
  • Next by Date: Re: licence key validation method
  • Previous by thread: ogles_gpgpu: GPGPU for iOS and Android using OpenGL ES 2.0
  • Next by thread: Re: Mouse tracking under a transparent view still working
  • Index(es):
    • Date
    • Thread