Re: NSButton setKeyEquivalent: leaving funny color?
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.