I handle such things in the CellBackgroundPaint event handler, for example:
[code]Function CellBackgroundPaint(g As Graphics, row As Integer, column As Integer) As Boolean
// Paint even rows, not selected
If row Mod 2=0 And Not Me.selected(row) Then
g.foreColor=&cECF3FE // light blue
g.fillrect 0,0,g.width,g.height
If column = 6 Then
g.foreColor=&cFFFF0000 // column 6 yellow
g.fillrect 0,0,g.width,g.height
End If
If column = 7 Then
g.foreColor=&cE6E6E600 // column 7 gray
g.fillrect 0,0,g.width,g.height
End If
// Paint odd rows, not selected
Elseif row Mod 2<>0 And Not Me.selected(row) Then
g.foreColor=&cFFFFFF // white
g.fillrect 0,0,g.width,g.height
If column = 6 Then
g.foreColor=&cFFFF0000 // column 6 yellow
g.fillrect 0,0,g.width,g.height
End If
If column = 7 Then
g.foreColor=&cE6E6E600 // column 7 gray
g.fillrect 0,0,g.width,g.height
End If
// When selected, then draw a top and bottom border
Elseif Me.selected(row) Then
If column<6 Then
' im.gradient(g,Me)
g.foreColor=&cFFFFFF00 // white
g.fillrect 0,0,g.width,g.height
g.foreColor=&c00000000
g.DrawLine 0,0,g.width,0 // border top
g.DrawLine 0,g.Height-1,g.width,g.Height-1 // border bottom
Else
If column = 6 Then
g.foreColor=&cFFFF0000
g.fillrect 0,0,g.width,g.height
g.foreColor=&c00000000
g.DrawLine 0,0,g.width,0
g.DrawLine 0,g.Height-1,g.width,g.Height-1
End If
If column=7 Then
g.foreColor=&cE6E6E600
g.fillrect 0,0,g.width,g.height
g.foreColor=&c00000000
g.DrawLine 0,0,g.width,0
g.DrawLine 0,g.Height-1,g.width,g.Height-1
End If
End If
End If
Return True
End Function
[/code]
And the code above produces a list looking like this: