Re: Need longer highlight w/ NSButton performClick:
Re: Need longer highlight w/ NSButton performClick:
- Subject: Re: Need longer highlight w/ NSButton performClick:
- From: Ricky Sharp <email@hidden>
- Date: Mon, 28 Mar 2005 12:17:24 -0600
On Monday, March 28, 2005, at 12:09PM, Glen Simmons <email@hidden> wrote:
>I'm calling -performClick: on an NSButton subclass which works fine
>except that the highlight doesn't last long enough. I'd like it to be
>more obvious to the user which button was "pressed". How can I get it
>to highlight for a set length of time, like .1 seconds?
In your NSButton subclass, override performClick: to basically do this:
[[self cell] setHighlighted:YES];
[self display];
NSDate* theDate = [[[NSDate alloc] initWithTimeIntervalSinceNow:myIntervalInSeconds] autorelease];
[NSThread sleepUntilDate:theDate];
[[self cell] setHighlighted:NO];
[self display];
--
Rick Sharp
instant Interactive(tm)
_______________________________________________
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