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的高度