public void makeBoxes(int size) // number of pictureboxes
{
for (int x = 0; x < size; x++)
{
PictureBox pic = new PictureBox();
picList.Add(pic);
}
pix = picList.ToArray();
}
public void insertPix()
{
for (int x = 0; x < pix.Length; x++)
{
pix[x].BorderStyle = BorderStyle.FixedSingle;
panel1.Controls.Add(pix[x]);
}
}
I don't know what the default value is for length and width of pictureboxes. Anyway I can't insert those pictureboxes on the panel1.
EDIT: ah nevermind I just forgot to execute the method... I figured out how to change the size in the loop and algorithm to make it arrange the boxes
This post has been edited by kneil_20: 08 July 2011 - 10:08 AM

New Topic/Question
Reply




MultiQuote




|