• 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: NSButton setKeyEquivalent: leaving funny color?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSButton setKeyEquivalent: leaving funny color?


  • Subject: Re: NSButton setKeyEquivalent: leaving funny color?
  • From: Simon Jacquier <email@hidden>
  • Date: Tue, 19 Mar 2002 13:47:06 +0100

Dan Wood <email@hidden> wrote:

> I'm wondering if anybody has run across this issue, and if there
> is any resolution.
>
> I have a "default" button, which throbs blue, that I switch to
> be a non-default button (using setKeyEquivalent:) after it has
> been pressed, so that the throbbing will stop. (After the user
> changes the text where it might make sense to use the button, I
> switch the key equivalent back to "\r" to make it default again.
>
> This technique works fine, except that depending on the shade of
> blue that the throbbing button was when I switched the key
> equivalent was, the button stays an inappropriately dark shade
> of gray.

I used to have the same problem.

Then I discovered that it was possible to set the default button without
using setKeyEquivalent:

[window setDefaultButtonCell:[yourButton cell]];

is all what you need. And no more grayed buttons.


Simon Jacquier
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSButton setKeyEquivalent: leaving funny color? (From: Dan Wood <email@hidden>)

  • Prev by Date: Re: click through view ?
  • Next by Date: Re: Memory Requirements
  • Previous by thread: NSButton setKeyEquivalent: leaving funny color?
  • Next by thread: Re: Newbie w/ stupid question...
  • Index(es):
    • Date
    • Thread