• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 935
  • Last Modified:

VB.net Highlighting a ListView Item


After adding a ListView item, I want to colour the background of the text?
How would I do this?
Is it possible to shade it using a gradient style?
Murray Brown
Murray Brown
1 Solution
Luis PérezSoftware Architect in .NetCommented:
Me.ListView1.Items(index).BackColor = your desired color

And about the gradient... theorically it's possible, but you must draw by yourself all the element, including icon, text, and so on... if you want to experiment with it, you must set the OwnerDraw property of the ListView to true and then write code in the DrawItem, DrawSubItem and DrawColumnHeader events.

Hope that helps.
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now