Am I missing something obvious here, I cannot find a way to assign an ImageIndex to a Subitem of a TListView.
I have the Listview set in vsReportMode with 2 columns, I can easily assign an ImageIndex to the first column Items, something like:
ListView1.Items[0].ImageIndex := 0;
ListView1.Items[1].ImageIndex := 1;
ListView1.Items[2].ImageIndex := 2;
I thought I could assign an ImageIndex to it's SubItems, something like this (which obviously does not work because the property does not seem to exist with SubItems)
ListView1.Items[0].SubItems[0].ImageIndex := 0;
ListView1.Items[1].SubItems[0].ImageIndex := 1;
ListView1.Items[2].SubItems[0].ImageIndex := 2;
Am I confusing myself again or is there no such property for SubItem Images?
Best Answer
Use
SubItemImages
instead:This results in