现在的位置: 首页 > 综合 > 正文

设置Listview行高–小技巧

2013年07月27日 ⁄ 综合 ⁄ 共 265字 ⁄ 字号 评论关闭

winform中,listview是没有办法设置行高的,没行之间排得密密麻麻的,很不好!

可以加入一个imagelist来 撑大 行,实现行高的设置!

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

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

抱歉!评论已关闭.