I need to display 100 images one below the other in the form.
I followed the below idea:
Added a panel to the Form and in code I added 100 picture box and assigned each picture box with the image I have.
Now the problem is I can see only 32 picture box.
Why? Any property need to be updated...?
Below is my code :
List<int> bottomlist = new List<int>();
for (int i = 0; i < 100; i++)
{
PictureBox pic = new PictureBox();
Image img = //I get image by some code here//
pic.Image = img;
pic.Size = img.Size;
if (i == 0)
bottomlist.Add(pic.Bottom + 8);
else
bottomlist.Add(pic.Bottom + bottomlist[i - 1] +8);
if (i == 0)
pic.Top = 8;
else
{
pic.Top = bottomlist[i - 1] + 8;
}
pic.Left = (panel1.ClientSize.Width - pic.Width) / 2;
panel1.Controls.Add(pic);
}