How can I set the background color of a specific item in a System.Windows.Forms.ListBox?
I would like to be able to set multiple ones if possible.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Probably the only way to accomplish that is to draw the items yourself.
Set the
DrawModetoOwnerDrawFixedand code something like this on the DrawItem event:The second option would be using a ListView, although they have an other way of implementations (not really data bound, but more flexible in way of columns).