• 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
Re: How to make a transparent NSView answer events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make a transparent NSView answer events


  • Subject: Re: How to make a transparent NSView answer events
  • From: Stéphane Sudre <email@hidden>
  • Date: Sat, 10 Apr 2004 22:45:20 +0200

On samedi, avril 10, 2004, at 09:18 PM, Giovanni Donelli wrote:

Hello Gurus!
I have NSImageView. For some reasons I subclassed it and now it works more or less like a button answering to mouseDown events.

Now the problem is that my NSImageView shows an image with an alpha channel which has only 10% opaque area. Because the opaque area is pretty small and narrow, it not easy to click on my fake button because I don't get the mouse down when the user clicks on a transparent point, even this point is inside the NSImageView frame.

Anyone knows how to make a NSView to answer events in all the area of his frame despite this area is transparent?

Thank you for your help... and Happy Easter to you and your families!

What does happen when you add this to your subclass?

- (NSView *)hitTest:(NSPoint)aPoint
{
return self;
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: How to make a transparent NSView answer events
      • From: John MacDonnell (Ti) <email@hidden>
References: 
 >How to make a transparent NSView answer events (From: Giovanni Donelli <email@hidden>)

  • Prev by Date: Re: How to find what kind of Objects are contained in NSArray
  • Next by Date: Re: Send Email with "deliverMessage"
  • Previous by thread: How to make a transparent NSView answer events
  • Next by thread: Re: How to make a transparent NSView answer events
  • Index(es):
    • Date
    • Thread