How to show icons and text in Winforms ListView when View style is set to Details?

14,052

Solution 1

Look the documentation for the SmallImageList of the ListView control and the ImageIndex and ImageKey properties of the ListViewItem class.

http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.smallimagelist.aspx

Solution 2

In the first column images are supported by standard ListView, but for other columns, you will have to search the Internet, if I remember correctly there are a couple of codeproject controls that enable images in other columns (SubItems of ListView)

Share:
14,052
Joan Venge
Author by

Joan Venge

Professional hitman.

Updated on June 15, 2022

Comments

  • Joan Venge
    Joan Venge almost 2 years

    I just want to have 2 columns like:

    Item                Value
    [icon] Gold         10
    [icon] Silver       2
    [icon] Iron         1
    

    Is this possible? Or do I need to have another column for the icons?

  • Joan Venge
    Joan Venge almost 13 years
    Thanks, I only need it for the first column.
  • Marciano.Andrade
    Marciano.Andrade about 10 years
    Agreed with @matsolof