Re: Setting RadioButton programatically
Re: Setting RadioButton programatically
- Subject: Re: Setting RadioButton programatically
- From: Fritz Anderson <email@hidden>
- Date: Sat, 23 Nov 2002 14:31:15 -0600
Do you mean you want to select one radio button in an NSMatrix of them?
If the buttons are arranged vertically, do this:
int selection;
[radioMatrix selectCellAtRow: selection column: 0];
To get the selected button do this:
selection = [radioMatrix selectedRow];
The NSMatrix ensures the proper radio-button behavior of only one
selection at all times.
The tag value of the cells is there for your reference only, and does
not affect the appearance or behavior of the cells.
-- F
On Friday, November 22, 2002, at 07:10 AM, Uwe Schlosser wrote:
I would like to set a RadioButton (5 button in a row) programatically.
I tried a way similar to a IBAction methode
-(void)boxAuswahlIntern:(int)value
{
id theCell = [myRadioButton selectedCell]; //myRadioButton is
IBOutlet and right connected IB
[theCell setTag:value];
}
but this does not work!
--
Fritz Anderson - Consulting Programmer - Chicago, IL
Mail: <email@hidden>
Risumi: <
http://resume.manoverboard.org>
_______________________________________________
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.