如何控制ListView中图标之间的距离?调整ImageList大小不行.
在线等待,谢谢.

解决方案 »

  1.   

    SendMessage(hListView, LVM_SETICONSPACING, 0, MakeLong(cx, cy));hListView是ListView的句柄,cx和cy是要图标之间的距离。
      

  2.   

    请问一下SendMessage放在那个事件里?谢谢.
      

  3.   

    SendMessage是发送消息的函数,直接用就可以了.
    可以在Form建立的时候改大小,即FormCreate里
      

  4.   

    好像这个消息没用,commtrl单元里的// -1 for cx and cy means we'll use the default (system settings)
    // 0 for cx or cy means use the current setting (allows you to change just one param)
    {$EXTERNALSYM ListView_SetIconSpacing}
    function ListView_SetIconSpacing(hwndLV: HWND; cx, cy: Word): DWORD;还是通过改变ImageList的Height跟Width属性
      

  5.   

    Listview怎么控制每一行显示的图标个数?