如何有效设置LISTVIEW行高?

解决方案 »

  1.   

     设置一个图片,帮定smallImagelist中,图片的高度即行高
      

  2.   

    个在WinForm里不好做了,如果不闲麻烦的话,这个可以通过OwnerDraw为True来实现。将ListView设为report型,将小图标绑定到Imagelist控件上,将ImageList控件设为自定义型。这样Item的行高将取决于ImageList控件自定义的大小了。
    以上事看到的别的帖子的回复,report 在这里哪里设置?OwnerDraw 事件在哪里?
      

  3.   


    ImageList imgList = new ImageList();
    imgList.ImageSize = new Size( 1, 22 ); //分别是宽和高
    imgList.Images.Add( global::xYuanShian.Resource.MyResources.Control_Panel ); AttribLists.SmallImageList = imgList;
    这样就可以定义他的行高了