Listview - Change row color selected color

J

John Devlon

Hi,

Can anyone please help me ?

I would like to highlight a selected row in a listview ?
Can I chooce a custom color?




Thanks

John
 
G

G Himangi

You will have to use custom drawing for that - see ListView.DrawItem event.

---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
 
G

Guest

If you don't have to choose a custom color, you can do it very simply. For
example Color. offers 134 choices; won't one of them be close enough? Then,
one line of code will set the backcolor and one one will set the forecolor as
in

lvCodeElts.Items(0).BackColor = Color.Coral

Just a suggestion to uncomplicate the matter.

HTH

(e-mail address removed)

Try our latest time saving tool, Visual Class Organizer, free for 30 days.

http://www.knowdotnet.com/articles/VisualOrganizerProductHome.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top