By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,349 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

Listview - Change row color selected color

P: n/a

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
Sep 16 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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
---------
"John Devlon" <jo********@hotmail.comwrote in message
news:A_**********************@phobos.telenet-ops.be...
>
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

Sep 17 '07 #2

P: n/a
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

Le*@KnowDotNet.com

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

http://www.knowdotnet.com/articles/V...oductHome.html


"G Himangi" wrote:
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
---------
"John Devlon" <jo********@hotmail.comwrote in message
news:A_**********************@phobos.telenet-ops.be...

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


Sep 20 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.