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

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -