Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 929
  • Last Modified:

VB.net Highlighting a ListView Item

Hi

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?
0
Murray Brown
Asked:
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.
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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