objective c - How to deselect radio button in cocoa -
i'm newbie. have problem nsmatrix. created mutiple nsmatrix want first loading, not checked. used code created them checked.
prototype= [[nsbuttoncell alloc] init]; [prototype settitle:@""]; [prototype setbuttontype:nsradiobutton]; nsrect matrixrect = nsmakerect(400, textfield_y, 50, 20); mymatrix = [[nsmatrix alloc] initwithframe:matrixrect mode:nsradiomodematrix prototype:(nscell *)prototype numberofrows:1 numberofcolumns:1]; [mymatrix settag:300+i]; //[mymatrix setaction:@selector(radiobuttonclicked:)]; [mymatrix settarget:self]; nsarray *cellarray = [mymatrix cells]; [[cellarray objectatindex:0] settag:0]; [guiview addsubview:mymatrix]; [prototype release]; [mymatrix release];
any ideas? lot
on nsbuttoncell use setstate
method of nscell
:
[prototype setstate:nsoffstate]
Comments
Post a Comment