S
Spurry Moses
Hi,
I want to create an array of combo boxes on my form.
The only problem is that I don't want to place 3 seperate combo boxes on
the form if I can avoid it. I'd just like to create an array and
dynamically create them. For example, like the code (that uses Radio
Buttons) below.
Can I do this and be able to position them on the form as well (even if
just in code). I would have to edit code that says "Form Designer Code -
Do not edit"... it all seems like it's not really feasible.
System.Windows.Forms.RadioButton [] radioButtons = new
System.Windows.Forms.RadioButton[3];
for(int i=0; i<3; ++i)
{
radioButtons = new RadioButton();
radioButtons.Text = stringArray;
radioButtons.Location = new System.Drawing.Point(10, 10+i*20);
this.Controls.Add(radioButtons);
}
I want to create an array of combo boxes on my form.
The only problem is that I don't want to place 3 seperate combo boxes on
the form if I can avoid it. I'd just like to create an array and
dynamically create them. For example, like the code (that uses Radio
Buttons) below.
Can I do this and be able to position them on the form as well (even if
just in code). I would have to edit code that says "Form Designer Code -
Do not edit"... it all seems like it's not really feasible.
System.Windows.Forms.RadioButton [] radioButtons = new
System.Windows.Forms.RadioButton[3];
for(int i=0; i<3; ++i)
{
radioButtons = new RadioButton();
radioButtons.Text = stringArray;
radioButtons.Location = new System.Drawing.Point(10, 10+i*20);
this.Controls.Add(radioButtons);
}