Then simply subclass NSButton, add an ivar called fakeEnabled, then override the mouseDown and mouseUp events to do the following:

-(void)mouseDown:(NSEvent*)event{
  if (fakeEnabled==NO){
    [super mouseDown:event];
  }
}

Do the same for mouseUp, and just have a getter and setter for fakeEnabled. VoilĂ : a button that always looks enabled but can be set to respond only part of the time.

Dave

Sent from my iPod

On Jan 12, 2009, at 11:20 AM, Donnie Lee <lpr...@gmail.com> wrote:

As others have already asked: what are you trying to accomplish?

I try to create a disabled button that looks like enabled button
:))))))) It's so easy to understand, why do you ask more more and
more???!!!

Donnie.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/davedelong%40me.com

This email sent to davedel...@me.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to