RadioButton rbt = null;
int xLocation = 25, yLocation = -22;
for (int j = 1; j < Length; j++)//Length根据自己需要确定,即生成RadioButton个数
{
rbt = new RadioButton();
rbt.Text = “str”;
yLocation += 22;
bt.Location = new System.Drawing.Point(xLocation, yLocation);
bt.Size = new System.Drawing.Size(70, 16);
bt.CheckedChanged += new EventHandler(rbt_CheckedChanged);
panel1.Controls.Add(rbt);//注意生成的RadioButton必须在一个容器里,这样才能实现单选
}
void rbt_CheckedChanged(object sender, EventArgs e)
{
}