listview with multiple imagelist and icons/image

笑着哭i 提交于 2019-12-23 15:44:15

问题


i need a way to use two imagelist on a listview. one of the image list if for header icons which contain 16x16 icons, and another will contains 32x32 thumbnail pictures within the sub items.

The image below shows what am trying to do


回答1:


i found a trick which solves the issue. the trick is to create a 16x16 icon on a 32x32 canvas and center it. this is because the thumbnail size is 32bit max. so i have one image list for 16pix isonc and another for 32pix icons

when thumbnail is needed, i only need to set the small icons to 32pix.

this support built it i only had to do this

' for the header columns
Set ListView1.ColumnHeaderIcons = ImageList1
' for the items and sub items
Set ListView1.SmallIcons = ImageList2

thanks for all your inputs



来源:https://stackoverflow.com/questions/13206339/listview-with-multiple-imagelist-and-icons-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!