Re: Button with a "mouseover" alternate image?
Re: Button with a "mouseover" alternate image?
- Subject: Re: Button with a "mouseover" alternate image?
- From: Chad Weider <email@hidden>
- Date: Sun, 15 Jan 2006 15:53:41 -0600
On Jan 15, 2006, at 2:49 PM, Theodore H. Smith wrote:
I'm trying to get an NSbutton, to have something like an
"alternateImage", except that it is a "mouseOverImage".
So this image will be displayed instead of the normal image, when
the mouse is over.
Any ideas how this is done?
You would probably want to use tracking rects. See the developer doc
"Handling Tracking-Rectangle and Cursor-Update Events in Views".
When the mouse rolls over a tracking rect you'll be sent a message to
mouseEntered: and then, when it leaves you'll get a message sent to
mouseExited:
Also, btw does anyone know how to get an NSView which accepts
NSDrag stuff, to display a blue outline inside itself, during the
drag operation? I can't figure it out.
Similarly, you can use dragginEntered: and draggingExited: and
draggingEnded: to take care of drawing the focus ring (these are
always called - don't use tracking rects).
Chad Weider
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden