请问listview 和 imagelist 在程序中怎么动态的关联和断开关联啊?谢谢了

解决方案 »

  1.   

    listview 没有 iconlist 属性和方法啊,还有别的办法吗?
      

  2.   

    '建立关联(小图标),ImageList1要预先载入图片
    Set Me.ListView1.SmallIcons = Me.ImageList1
    '断开关联(小图标)
    Set Me.ListView1.SmallIcons = Nothing'建立关联(普通),ImageList1要预先载入图片
    Set Me.ListView1.Icons = Me.ImageList1
    '断开关联(普通)
    Set Me.ListView1.Icons = Nothing
    '建立关联(列标头),ImageList1要预先载入图片
    Set Me.ListView1.ColumnHeaderIcons = Me.ImageList1
    '断开关联(列标头)
    Set Me.ListView1.ColumnHeaderIcons = Nothing