سلام دوستان
من یه همچین کدی نوشتم تا بصورت ران تایم تعدادی panel که تو هر کدوم چهار تا radiobutton هست را تولید کنه اما فقط یه panel با یه همچین مشخصاتی ایجاد می کنه
int k = -99;
for (int i = 0; i < 10; i++)
{
Panel p = newPanel();
p.Location = new System.Drawing.Point(1, k+100);
p.BackColor = Color.Blue;
RadioButton r1 = newRadioButton();
r1.Location = new System.Drawing.Point(10, 10);
RadioButton r2 = newRadioButton();
r2.Location = new System.Drawing.Point(10, 30);
RadioButton r3 = newRadioButton();
r3.Location = new System.Drawing.Point(10, 50);
RadioButton r4 = newRadioButton();
r4.Location = new System.Drawing.Point(10, 70);
p.Controls.Add(r1);
p.Controls.Add(r2);
p.Controls.Add(r3);
p.Controls.Add(r4);
this.Controls.Add(p);
}
1
لطفا راهنمایی کنید