ListView1.SelectedItem.SmallImage = ???
I have the following:
VB Code:
Private Sub cmdLargeFish_Click()
Dim lvwItem As ListItem
Set lvwItem = ListView1.SelectedItem
If Not lvwItem Is Nothing Then
lvwItem.SmallImage = "LARGE_FISH"
Set lvwItem = Nothing
End If
End Sub
Private Sub cmdIllFish_Click()
Dim lvwItem As ListItem
Set lvwItem = ListView1.SelectedItem
If Not lvwItem Is Nothing Then
lvwItem.SmallImage = vbNullString/0 'What the heck do you put here to REMOVE/CLEAR the image??? :(
Set lvwItem = Nothing
End If
End Sub
How can I remove the image from the selected item???
Woka
Hmm, why doesnt my code work?
Hello Woka
Thanks for the fast reply.
It funny that my code doesnt work (actually not :( ) when yours do.
In my code in the previous post, only the first item in the listview toggles the smallicon when I click on it. the other 9 items doesnt change at all :(
In the imagelist I have two images, with key= "on" & "off". It works fine to toggle between the two images but when I want to toggel between "on" and no icon, only the first item works.
Any ideas?