• 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: Disabled button looks like enabled
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disabled button looks like enabled


  • Subject: Re: Disabled button looks like enabled
  • From: Dave DeLong <email@hidden>
  • Date: Mon, 12 Jan 2009 11:28:59 -0700

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 <email@hidden> 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 (email@hidden)

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:
This email sent to email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Disabled button looks like enabled
      • From: "Donnie Lee" <email@hidden>
References: 
 >Disabled button looks like enabled (From: "Donnie Lee" <email@hidden>)
 >Re: Disabled button looks like enabled (From: Ricky Sharp <email@hidden>)
 >Re: Disabled button looks like enabled (From: Luca <email@hidden>)
 >Re: Disabled button looks like enabled (From: "Donnie Lee" <email@hidden>)
 >Re: Disabled button looks like enabled (From: "I. Savant" <email@hidden>)
 >Re: Disabled button looks like enabled (From: "Donnie Lee" <email@hidden>)
 >Re: Disabled button looks like enabled (From: Andy Lee <email@hidden>)
 >Re: Disabled button looks like enabled (From: "Donnie Lee" <email@hidden>)

  • Prev by Date: Re: Disabled button looks like enabled
  • Next by Date: Re: Disabled button looks like enabled
  • Previous by thread: Re: Disabled button looks like enabled
  • Next by thread: Re: Disabled button looks like enabled
  • Index(es):
    • Date
    • Thread