• 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: Transparant button click
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Transparant button click


  • Subject: Re: Transparant button click
  • From: Uli Kusterer <email@hidden>
  • Date: Mon, 30 Aug 2010 11:33:28 +0200

On Aug 27, 2010, at 10:18 PM, Erik Colson wrote:
> What would be the best way to create a button with a partially transparent image on a nsview that would only respond to mouse clicks that are on the non-transparent part of the image ?


 Override NSView's -hitTest: method on a subclass of NSButton and check the pixel clicked on the NSImage for transparency > 0.5 (or use 10.6's new image hit-testing method)?

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."

_______________________________________________

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

References: 
 >Transparant button click (From: Erik Colson <email@hidden>)

  • Prev by Date: Re: Core Data and REST
  • Next by Date: Core Data search optimization
  • Previous by thread: Re: Transparant button click
  • Next by thread: Translation.
  • Index(es):
    • Date
    • Thread