Delphi XE2 列表视图工件 [英] Delphi XE2 listview artifacts
本文介绍了Delphi XE2 列表视图工件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 vsreport 虚拟模式下使用 listview,有两列,在我填充列表后,选择一行,然后选择其他行,之前选择的行上有一个工件,见下图.如何解决这个问题?
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
推荐答案
将列表视图的 DoubleBuffered 属性设置为 true 可以解决工件问题.
Setting the listview's DoubleBuffered property to true solves the artifacts problem.
这篇关于Delphi XE2 列表视图工件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文