Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21278

how to reset msflexgrid row color?

$
0
0
Friends,

VB6SP6

Code:

Private Sub Grid_Click()

rowval = Me.Grid.RowSel

With Grid
    .Row = rowval    ' the row you want to highlight
    For i = 0 To .Cols - 1
        .Col = i
        .CellBackColor = QBColor(14)
    Next i
End With

End Sub

From the above code, after displaying some 10 rows...i am clicking any row and the background color of that row is changing to yellow...now my problem is....if i click anyother row, then the previous clicked row color of yellow should be changed to the default color (that is white color)..but from this code if i click 10 rows, all the rows are changing into yellow color...i want to reset the previous selected rows color. i want only one row(which i am clicking) should be colored. how can i do that?

thanks

Viewing all articles
Browse latest Browse all 21278

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>