You could go for the ListView in View.Details view, as this is similar to the view that you see in Windows Explorer when in Details view.
Create a form and place on it an ImageList
and a ListView
named imageList1
and listView1
respectively. Then place the following code into the forms load method:
listView1.Columns.Add("Image");
listView1.Columns.Add("Text1");
listView1.Columns.Add("Text2");
listView1.SmallImageList = imageList1;
var icon = Icon.ExtractAssociatedIcon(@"c:\windows\explorer.exe");
imageList1.Images.Add(icon);
var item = new ListViewItem();
item.ImageIndex = 0;
var subItem1 = new ListViewItem.ListViewSubItem();
subItem1.Text = "Text 1";
var subItem2 = new ListViewItem.ListViewSubItem();
subItem2.Text = "Text 2";
item.SubItems.Add(subItem1);
item.SubItems.Add(subItem2);
listView1.Items.Add(item);
The code really couldn't hurt for some tidying up, but it calls out quite explicitly what it's doing and should hopefully make it quite clear how to use a ListView
for this purpose.