Search code examples
delphidelphi-xe2tlistview

Delphi XE2 listview artifacts


I am using listview in vsreport virtual mode, have two columns and after I populate the list, select one row, and then select some other row there's an artifact left on a previously selected row, see image below. How to fix this?enter image description here

and this is my code that gets the data from an array

procedure TForm1.ListView1Data(Sender: TObject; Item: TListItem);
begin
  Item.Caption := FloatToStr(Item.Index + 1);
  Item.SubItems.Add(FloatToStr(a[Item.Index]));
end;

When I hover the mouse, the artifacts dissapear. Thanks


Solution

  • Setting the listview's DoubleBuffered property to true solves the artifacts problem.