quirky default button coloring
quirky default button coloring
- Subject: quirky default button coloring
- From: Daniel Child <email@hidden>
- Date: Thu, 21 Feb 2008 14:55:27 -0500
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