Delphi C#改变TListView控件Items的高度

TListView控件Items的高度 设置比较麻烦,但是可以通过添加一个ImageList来改变实现

C#中
//   设置行高   20  
ImageList   imgList   =   new   ImageList(); 
imgList.ImageSize   =   new   Size(1,   20);//分别是宽和高

listView1.SmallImageList   =   imgList;   //这里设置listView的SmallImageList ,用imgList将其撑大

Delphi中

var
  imgList : TImageList;
begin
//使items的高变高
imgList := TImageList.Create(nil);
imgList.Height := 24; //高
listView1.SmallImages := imgList;

end

Delphi C#改变TListView控件Items的高度

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

滚动到顶部