Re: Programatically create a NSRadioButton
Re: Programatically create a NSRadioButton
- Subject: Re: Programatically create a NSRadioButton
- From: "Erik M. Buck" <email@hidden>
- Date: Mon, 27 Sep 2004 19:44:58 -0400
Radio buttons are in fact a matrix if button cells. The exclusive
selectivity is a property of the matrix.
You can create a matrix of button cells in Interface Builder by Alt-Dragging
the resize knobbies of a selected button. Then set the attributes of the
resulting matrix to radio mode e.g. exclusive selection, no empty selection,
radio style button cells.
To programmatically create a matrix of button cells you do exactly the same
operations programmatically that IB does as the result of your input. e.g.
Create an NSMatrix instance, set its cell prototype to an NSButtonCell, set
that attributes of the matrix via its public methods (the same ones IB
uses), and set the attributes of the prototype button cell and or all of the
contained button cells.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden