• 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: Making an NSButton appear selected.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making an NSButton appear selected.


  • Subject: Re: Making an NSButton appear selected.
  • From: Tom Hohensee <email@hidden>
  • Date: Fri, 05 Jun 2009 17:33:43 -0500

I think what you want is to set the button to enabled or not through the action of another button? Since NSButton is a subclass on NSControl you could use the setEnabled method.

interface
	IBOutlet NSButton *Abutton;
	IBOutlet NSButton *Bbutton;

implementation

-(IBAction)someActionMethod:(id)selector
{
[Abutton setEnabled:NO];
[Bbutton setEnabled:YES];
.......
..........
...........
}

You can set the state of the other button in the action method.

On Jun 5, 2009, at 6:41 AM, Shraddha Karwan wrote:

I have a series of buttons of type NSButton.
When a particular button is selected, I want to make it appear gray as in
this button is selected. When another button is selected, I need to change
the color of the previously selected button from Gray to normal. By gray I
mean textured.
How do I achieve this?


--
Regards,
Shraddha Karwan

Success usually comes to those who are too busy to be looking for it.
_______________________________________________

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


References: 
 >Making an NSButton appear selected. (From: Shraddha Karwan <email@hidden>)

  • Prev by Date: Re: Profiling a drag and drop operation
  • Next by Date: Re: Profiling a drag and drop operation
  • Previous by thread: Re: Making an NSButton appear selected.
  • Next by thread: Re: Nested AutoRelease Pools Crash
  • Index(es):
    • Date
    • Thread