• 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: Button with a "mouseover" alternate image?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Button with a "mouseover" alternate image?


  • Subject: Re: Button with a "mouseover" alternate image?
  • From: "Theodore H. Smith" <email@hidden>
  • Date: Mon, 16 Jan 2006 12:55:34 +0000


On 15 Jan 2006, at 21:53, Chad Weider wrote:


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:



Any idea how I'd draw the images and handle them? I know about mouseOver events already.


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).



I'd like to know how to draw the focus ring, though. I'm already using draggingEntered and all that.


Is there some prefered recommended manner for drawing the ring? Or must I just draw it with some custom drawing code?? If so, then I can say that I'm not surpised that it seems every Mac app's drag border looks different from every other's!!

Shame there is no standard drawing routine, eh?

_______________________________________________
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


  • Follow-Ups:
    • Re: Button with a "mouseover" alternate image?
      • From: Robert Dell <email@hidden>
References: 
 >Button with a "mouseover" alternate image? (From: "Theodore H. Smith" <email@hidden>)
 >Re: Button with a "mouseover" alternate image? (From: Chad Weider <email@hidden>)

  • Prev by Date: Re: [Core Data] Improve save performance ?
  • Next by Date: Re: Button with a "mouseover" alternate image?
  • Previous by thread: Re: Button with a "mouseover" alternate image?
  • Next by thread: Re: Button with a "mouseover" alternate image?
  • Index(es):
    • Date
    • Thread