c# - Add image and value to a panel? -
i able add image panel following code, problem need retrieve information image etc(key value)
is possible add in value every image?
foreach (system.drawing.image img in imagelist) { picturebox imagepicbox = new picturebox(); imagepicbox.name = "image" + imagepanel.controls.count.tostring(); imagepicbox.image = img; imagepicbox.size = imagepicbox.image.size; imagepicbox.backcolor = color.black; imagepicbox.sizemode = pictureboxsizemode.stretchimage; imagepicbox.borderstyle = borderstyle.fixedsingle; imagepanel.controls.add(imagepicbox); }
you can use tag property of system.drawing.image add whatever data want. it's there for.
Comments
Post a Comment