How can I set an icon for a ListViewSubItem?

前端 未结 7 637
既然无缘
既然无缘 2020-12-05 19:36

In a ListView you can have icons on each item.
When viewing in Details-mode, the icon is shown in the left-most column.

Can I show an icon in some other column?<

7条回答
  •  -上瘾入骨i
    2020-12-05 20:12

    Use P/Invoke and send LVM_SETITEM message to the listview (you should set LVS_EX_SUBITEMIMAGES style on control creation or via LVM_SETEXTENDEDLISTVIEWSTYLE), specify the subitem index and the corresponding image index. You will need to do it for every list item you insert.

提交回复
热议问题