Re: quirky default button coloring
Re: quirky default button coloring
- Subject: Re: quirky default button coloring
- From: "Ken Ferry" <email@hidden>
- Date: Thu, 21 Feb 2008 12:29:50 -0800
Hi Daniel.
I think you're confusing the focus ring with the default button.
Default button:
http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGControls/chapter_19_section_3.html#//apple_ref/doc/uid/TP30000359-DontLinkElementID_446
Focus ring:
http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGUserInput/chapter_12_section_3.html//apple_ref/doc/uid/TP30000361-BJCFCJAF
The only button that draws differently when its key equivalent is
return is the standard push button like you see in alerts. "OK" is
often the text on the button. The pulsing blue animation is how the
user knows it is default.
The focus ring is different. You move focus from control to control
with the tab key, and the space bar will activate the control that has
the ring around it. The user can only tab to a button if he has
selected the "All controls" option for "In windows and dialogs, press
Tab to move the keyboard focus between:" in the Keyboard & Mouse
preference pane.
Default buttons should probably always be the standard aqua glassy
style (which is NSRoundedBezelStyle if you're making 'em in code).
There are a few counterexamples in Apple apps, but it's not clear that
those cases were a good idea.
'Highlighted' for a button means, pressed, by the way. You told your
buttons to draw their pressed art.
-Ken
On Thu, Feb 21, 2008 at 11:55 AM, Daniel Child <email@hidden> wrote:
> From what I read, the default (button in a view is outlined/shaded
> in blue and is set as the button which responds to RETURN. I have a
> serious of buttons (step 1, step 2, etc.), and I want the appropriate
> button to be highlighted as the default when it is turn to do that
> step. I used this code within a "showWindow" method which loads the
> window.
>
> int stepsCompleted = [[dataValues objectForKey: @"steps completed"]
> intValue];
>
> switch (stepsCompleted)
> {
> case 0:
> [step1Button setKeyEquivalent:@"\r"];
> break;
>
> case 1:
> [step2Button setKeyEquivalent:@"\r"]; // works
> [step1Button setKeyEquivalent:@""]; // but blue edge does not
> move to button 2
> break;
> ....
>
> From When I do this, the correct button does indeed respond to
> RETURN. But the blue highlight remains on the first button. I also
> tried [<button> setHighlight: <YES/NO>] to control the highlighting
> state, but with square buttons that simply makes them a dark grey and
> does not affect the blue outline.
>
> In the nib, all of the buttons are marked as having no key
> equivalent. I should note that I am using the square button shape. Is
> this a bug?
> _______________________________________________
>
> 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