views:

225

answers:

1

hi all I want to show a icon (up or down) when i sort a column (asc or desc) of a ListView, so I assingned the SmallImages property to a ImageList (with two icons for up and down). My problem is that when I enter data, the firtst icon in the ImageList is shown in every line of the ListView.

PS (ListView.ViewStyle:=vsReport)

+1  A: 

You can set the ImageIndex on each of the TListItems to -1 to stop them showing images, but you will still have the gap where the image should be.

 with ListView1.Items.Add do
 begin
     Caption := 'Foo';
     ImageIndex := -1;
 end;
Re0sless