• 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: Fading a control
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fading a control


  • Subject: Re: Fading a control
  • From: Dustin Mierau <email@hidden>
  • Date: Wed, 5 Dec 2001 18:06:08 -0800

I was hoping there would be a more generic solution to this problem. Like building upon NSControl. Oh well, thanks though.

-dustin

On Tuesday, December 4, 2001, at 05:08 PM, John C. Randolph wrote:

On Wednesday, December 5, 2001, at 04:07 PM, Dustin Mierau wrote:

Alright, so how would someone, oh let's call him Mustin Dierau,
set the opacity of an NSControl? This is done with the controls
in the OS X login window.

Just a guess, I haven't tried this, but..

Subclass the control in question. In your -drawRect: method,
lock focus on an NSImage instance of the same size as self, call
[super drawRect:..], unlockfocus on the image, lock focus back
on self, and composite the image in place with one of the
dissolveToPoint.. methods.

-jcr


"For every complex problem there is an answer that is clear,
simple, and wrong." -- H L Mencken
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >Re: Fading a control (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: Re: Cocoa & signal handlers
  • Next by Date: Re: Storing NSString with attributes + RTF
  • Previous by thread: Re: Fading a control
  • Next by thread: Re: Fading a control
  • Index(es):
    • Date
    • Thread