Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

quirky default button coloring



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.