0
我创建动态N个无线按钮上的形式在这条路上单选按钮和人气指数它们:动态创建内部形状
private void CreateRadioButton()
{
int rbCount = 40;
System.Windows.Forms.RadioButton[] radioButtons = new System.Windows.Forms.RadioButton[rbCount];
for (int i = 0; i < rbCount; ++i)
{
radioButtons[i] = new RadioButton();
radioButtons[i].Text = Convert.ToString(i);
int x = 514 + i*37;
int y = 20;
radioButtons[i].Location = new System.Drawing.Point(x,y);
radioButtons[i].Size = new Size(37, 17);
this.Controls.Add(radioButtons[i]);
}
}
在这种情况下,单选按钮都在一行中创建,但我需要他们安排特定区域内有多行。可能吗?用什么方法来解决这类问题?
TableLayoutPanel中 – Steve
或者FlowLayoutPanel的 –
或[单选按钮列表(http://stackoverflow.com/a/41355419/3110834)。 –