Re: How to make a transparent NSView answer events
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.