This has been asked many times on many forums, the answer is not an easy one, would you consider a listview in 'list' view which looks the same and would be soooo much easier? This I can help you with.
For ListBox you have to set DrawMode to OwnerDrawFixed and handle the DrawItem event, see DrawMode/DrawItem in help for code example.
ListView is much easier as you can just set BackColor for each ListViewItem (calculate index Mod 2 to alternate).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.