Detecting mouseover in an NSActionCell subclass
Detecting mouseover in an NSActionCell subclass
- Subject: Detecting mouseover in an NSActionCell subclass
- From: Jean-Nicolas Jolivet <email@hidden>
- Date: Mon, 12 Jan 2009 14:56:00 -0500
I'm writing an NSActionCell subclass, basically it displays an icon on
the left, 2 text lines in the middle, and 2 buttons on the right....
I've got it all working at this point, the 2 buttons on the right are
just NSImages and I'm using startTracking, continueTracking and
stopTracking, with my buttons Rect, to detect if they were clicked on...
However, I was wondering if it's possible to track when the buttons
are moused over so that I can display an alternative image? I've seen
countless apps doing it... the best example I could give is Safari's
Download window, where you have a little Magnifying glass icon on the
right (The "Reveal in Finder" button)... this is exactly what I'm
trying to achieve...
Right now it's pretty much all working except for the button
mouseover... I tried messing with hitTest, startTracking etc... but it
appears they are all only called when the left mouse button is down,
if it isn't they never seem to be called...
Any help or ideas would be appreciated!
Jean-Nicolas Jolivet
email@hidden
http://www.silverscripting.com
_______________________________________________
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