trying to make mouse cursor changes when hover an NSImageView
trying to make mouse cursor changes when hover an NSImageView
- Subject: trying to make mouse cursor changes when hover an NSImageView
- From: Wilker <email@hidden>
- Date: Thu, 25 Aug 2011 19:46:54 -0300
Hi guys,
I'm needing to make some linkable images on my software (for my about
window), the part related to click and go to link is working fine, but I
can't make the cursor change to hand (pointer) when mouse is over it, I
tried some approaches like using mouseEntered and mouseExited to handle, but
no luck, and them tried with addCursorRect, but still can't get it to
work...
How can I make it work, so user have a better idea that the images are
clickable?
This is the current code for my custom NSImageView (pretty simple):
@implementation LinkableImageView
@synthesize targetURL;
- (void)mouseDown:(NSEvent *)theEvent
{
[super mouseDown:theEvent];
if (targetURL) {
[[NSWorkspace sharedWorkspace] openURL:[NSURL
URLWithString:targetURL]];
}
}
@end
---
Wilker LĂșcio
http://about.me/wilkerlucio/bio
Kajabi Consultant
+55 81 82556600
_______________________________________________
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