ListView Font COlor

Lanc1988

Contributor
Joined
Nov 27, 2003
Messages
508
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.

Visual Basic:
            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.
 
Back
Top