Re: Fading a control
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