foreach (Object items in checkedListBox1.CheckedItems)
{
listBox1.Items.Add(items);
}
int camCount = listBox1.Items.Count;
arrCam = new TextBox[camCount];
int dist = 0;
for (int i = 0; i < camCount; i++)
TextBox tx = new TextBox();
arrCam[i] = tx;
foreach (TextBox fortx1 in arrCam)
fortx1.Location = new Point(448, 13 + dist);
groupBox8.Controls.Add(fortx1);
dist += 25;
here the problem is when i check all the items in checkedlistbox,items go to listbox and then generate the textboxes according to the listbox's item count.Till here it working fine,now when i uncheck any item from checkedlistbox the total no. of textboxes should also change but those textboxes are not getting redrawn only previously drawn textboxes remain in form. Can someone help me out where I am going wrong or where is the piece of code missing?