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

Winform窗口中,控件listview是无法设置行高的,没行之间排得密密麻麻的,很挤,效果很不好!

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

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

 

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

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

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

这样我们通过设置IMagelist的高度就可以变动listview的行高了,谢谢大家的观看~

posted on 2010-03-10 13:59  依然微笑。。  阅读(4510)  评论(1编辑  收藏  举报

导航