Re: Add ComboBoxes in runtime based on user input, how?



When I use this code, no comboboxes appear..I have now decleared the
cboTeam variable as a public variable

for (int i = 0; i < numberOfTeams; i++)
{
cboTeam = new ComboBox();

this.tabNewCup.Controls.Add(cboTeam);
cboTeam.FormattingEnabled = true;
cboTeam.Location = new System.Drawing.Point(220, 424);
cboTeam.Name = "cboTeam" + i.ToString();
cboTeam.Size = new System.Drawing.Size(121, 21);
cboTeam.TabIndex = 0;
cboTeam.Visible = true;
}

.