问题
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?
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
回答1:
Setting the listview's DoubleBuffered property to true solves the artifacts problem.
来源:https://stackoverflow.com/questions/15487136/delphi-xe2-listview-artifacts