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)。 –