A
Archimed
Hi,
I try to use an ImageList with a ListView but that don't work.
I make a ListView in VirtualMode with LargeIcon view.
I put the ImageList in the LargeImageList property.
I add a bitmap to the ImageList
When i want to see the item "icon" with the imagelist imageindex
property that work, but with the imagekey property that don't work
At the form load :
ListView1.VirtualListSize = 1
In the RetrieveVirtualItem event (use ImageIndex):
Dim item As New ListViewItem("test", 0)
e.Item = item
That work
In the RetrieveVirtualItem event (unse ImageKey) :
Dim str As String = "1.JPG"
Dim item As New ListViewItem("test", str)
e.Item = item
That don't work ! However ImageList1.Images.ContainsKey(str) = true !
Could you help me ?
I have forgotten something ?
Thanks
(excuse me, i don't speak English very well)
I try to use an ImageList with a ListView but that don't work.
I make a ListView in VirtualMode with LargeIcon view.
I put the ImageList in the LargeImageList property.
I add a bitmap to the ImageList
When i want to see the item "icon" with the imagelist imageindex
property that work, but with the imagekey property that don't work
At the form load :
ListView1.VirtualListSize = 1
In the RetrieveVirtualItem event (use ImageIndex):
Dim item As New ListViewItem("test", 0)
e.Item = item
That work
In the RetrieveVirtualItem event (unse ImageKey) :
Dim str As String = "1.JPG"
Dim item As New ListViewItem("test", str)
e.Item = item
That don't work ! However ImageList1.Images.ContainsKey(str) = true !
Could you help me ?
I have forgotten something ?
Thanks
(excuse me, i don't speak English very well)