Re: Programmatically setting a radio button
Re: Programmatically setting a radio button
- Subject: Re: Programmatically setting a radio button
- From: "Louis C. Sacha" <email@hidden>
- Date: Wed, 21 Jan 2004 20:26:59 -0800
Hello...
Well in obj-C, you could set the current button in a matrix of radio
buttons this way:
[MyMatrix selectCellAtRow:1 column:0];
I don't have the java version of the AppKit docs handy, but I would
guess that the java equivalent would be something like:
MyMatrix.selectCellAtRowColumn(1,0);
or
MyMatrix.selectCellAtLocation(1,0);
Hope that helps...
Louis
Hi,
I have an NSMatrix of radio buttons which I need to set the state of
programmatically, but cannot get the thing to work, I've done the
same thing elsewhere in my program for an NSMatrix of Pushbuttons
(radio behaviour, just looks different.)
I am using (in Java, but Obj-C advice is welcome.)
MyMatrix.cellAtLocation(1,0).setState(NSCell.OnState);
I think the problem is that the action of pushing the one of the
radio buttons in the NSMatrix is the action that triggers the
setting of the radio buttons (depending on the response from a modal
dialog.) If I use the above code triggered by a seperate widget, it
works fine.
I think the setting of the state is working fine, but Cocoa just
set's it right back.
Any ideas?
Thanks very much in advance.
Moray
_______________________________________________
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.
_______________________________________________
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.