• 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: "John C. Randolph" <email@hidden>
  • Date: Tue, 4 Dec 2001 17:08:23 -0800

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


  • Follow-Ups:
    • Re: Fading a control
      • From: Charles Jolley <email@hidden>
    • Re: Fading a control
      • From: Dustin Mierau <email@hidden>
References: 
 >Fading a control (From: Dustin Mierau <email@hidden>)

  • Prev by Date: Fading a control
  • Next by Date: Re: JavaBridge
  • Previous by thread: Fading a control
  • Next by thread: Re: Fading a control
  • Index(es):
    • Date
    • Thread