Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change image on a listview list

Status
Not open for further replies.

markhkram

IS-IT--Management
Dec 30, 2008
32
US
Anyone know how to change the currently selected item in a listview from image 0 to image 1 (images in an image list)?

All without having to reload the contents of the listview?

Thanks
 
Would
Code:
ListView1.SelectedItems(0).ImageIndex = 1

do the job?
 
Thanks, that worked great if I only select 1, but if I select more than one, it only changes the 1st one I selected...

Any idea on how I can change it for multiple? This will at least get me started if you don't...

Thanks!
 
Nevermind on the multiple selected, I figured it out.

Just used a variable (i) that counted through a loop.
ListView1.SelectedItems(i).ImageIndex = 1

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top