Lanc1988 Posted June 28, 2008 Posted June 28, 2008 Is there a way to change the color of the column in a list view instead of the whole row changing color? I have a 3 column listview and I would like the 3rd column to be a dark green but when I use the following code it is changing the whole row instead of just the one subitem. Dim i As Integer For i = 0 To ListView1.Items.Count - 1 If CInt(ListView1.Items(i).SubItems(1).Text) = 0 Then ListView1.Items(i).SubItems(0).ForeColor = Color.Green End If Next I tried changing the SubItems(0) to SubItems(2) but then the code doesnt work at all. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.