ListView Image Size. Too much space between each ListViewItem

A

Alex Gray

Hi,

I have a ListView that displays only images, but there is too much
space between each ListView Item. Is there a way to make the images
closer together?
---------------------------------------------
Here is the code that sets up a ListView:
this.listView1.BackColor = System.Drawing.Color.DarkGray;
this.listView1.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle;
this.listView1.Location = new System.Drawing.Point(72, 224);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(296, 168);
this.listView1.TabIndex = 24;

Here is the code that addes the ListViewItems:
ImageList imglist = new ImageList();
imglist.Images.Add(myImage); // myImage is a 65x65 pixel bitmap
this.listView1.LargeImageList = imglist;
imglist.ImageSize = new Size(65,65);

this.listView1.Items.Add( new ListViewItem("",0));
this.listView1.Items.Add( new ListViewItem("",0));
this.listView1.Items.Add( new ListViewItem("",0));
this.listView1.Items.Add( new ListViewItem("",0));
---------------------------------------------
When I run the app, i see all the ListViewItems, but there is so much
space (this.listView1.BackColor) between each of them! Is there a way
to get rid of this "padding"?

-alex-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top