您的位置:首页 > 编程语言 > C#

C#如何设置Listview的行高-高度

2010-03-10 13:59 302 查看
Winform窗口中,控件listview是无法设置行高的,没行之间排得密密麻麻的,很挤,效果很不好!

具体如何设置它的行高呢?

咱们可以加入一个imagelist(图片列表控件)来 撑大 行,实现行高的设置!

ImageList imageList = new ImageList(); //设置行高20

imageList.ImageSize = new System.Drawing.Size(1, 20); //分别是宽和高

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

这样我们通过设置IMagelist的高度就可以变动listview的行高了,谢谢大家的观看~
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: