改变 ListView 的行高 (Line Height) (cjc,2009.6.2)
改变 ListView 的行高 (Line Height)   (cjc,2009.6.2)

ListView在Report模式下,行与行间隔较窄,以下方法在不更换字体的情况下,改变行高,使看起来宽松一点。

1. 在form上放一个 ImageList 控件
2. 在 Listview 中把 SmallImages 指定为该控件
3. 修改 ImageList 控件中的 Height 属性,缺省是16,改成比你的ListView字体高度高的值.

运行时才能看到效果。

 

TListView 行高不由你控制的

不过有个技巧,你把ListView的SmallImages指向TImageList空间,然后通过调整TImageList的Height,就可以调整ListView的Height了,如果你不想显示
小图标,把TImageList的Width调整为0,就可以了
begin
  ListView1.SmallImages:=ImageList1;
  ImageList1.Height:=20;   //<=此处调整ListView1的行高
  ImageList1.Width:=0;
end;

 

posted on 2013-09-08 21:26  del88  阅读(259)  评论(0)    收藏  举报