Delphi XE2 listview工件 [英] Delphi XE2 listview artifacts

查看:157
本文介绍了Delphi XE2 listview工件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在vsreport虚拟模式下使用listview,有两列,在填充列表之后,选择一行,然后选择其他一行在先前选择的行上留下的工件,请参见下图。如何解决这个问题?



这是我的代码,从数组中获取数据

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

当鼠标悬停时,工件消失。
谢谢

解决方案

将listview的DoubleBuffered属性设置为true可以解决工件问题。


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

解决方案

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

这篇关于Delphi XE2 listview工件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆