Search code examples
c#winformslistviewimagelist

Fill images on listView space in Windows Form


Is it possible to fill up images on listView space instead of each taking up a separate line in listView. I have a imageList object which stored all the required image and want it to fill up the spaces in listView. I have added imageList object to smallImageList property and changed View property to smallIcon in drag and drop design page. Used below line to display the listView. listView1.Items.Add("",0); listView1.Items.Add("", 1); listView1.Items.Add("", 2); listView1.Items.Add("", 4);

Thanks


Solution

  • You cannot do that with ListView control. Instead I suggest to use FlowLayoutPanel. You can add PictureBoxes on it setting them same size.