开发者

Alternative to ImageList Tag

开发者 https://www.devze.com 2023-03-14 06:37 出处:网络
I asked this question earlier Get image from list view To which i got a reply of \"Use the开发者_如何学C tag field\". However after spending all morning trying to do this and the Tag field always bei

I asked this question earlier Get image from list view

To which i got a reply of "Use the开发者_如何学C tag field". However after spending all morning trying to do this and the Tag field always being null i got curious and stumbled across this

http://connect.microsoft.com/VisualStudio/feedback/details/115832/imagelist-does-not-preserve-the-tag-property-of-images-added

When creating an ImageList and adding an image that has the "Tag" property set to a non-null value, the ImageList does not retain the Tag value for the image. When retrieving the image at a later time from the ImageList, the Tag property of the image is null.

Now i am pretty stuck, what alternatives are there to using Tag?

Thank you

foreach file in the pdf collection

add it to the image list

determine other files to add

add to the image list

set ListviewImages to imagelist pictures`

Now i want to use the item clicked (a ListViewItem) and determine how to open it (a pdf does a certain task, a custom icon does something else)

Sorry i cant be more precise but i am worried about posting work data/code

0

精彩评论

暂无评论...
验证码 换一张
取 消