|
|
|
|
|
Dicas
|
|
Visual Basic (Grid/FlexGrid)
|
|
|
Título da Dica: Colorir uma linha do ListView
|
|
|
|
Postada em 1/9/2004 por PC
Public Sub ColorListviewRow(LV As ListView, RowNbr As Long, RowColor As OLE_COLOR) '*************************************************************************** 'Purpose: Color a ListView Row 'Inputs : lv - The ListView ' RowNbr - The index of the row to be colored ' RowColor - The color to color it 'Outputs: None '*************************************************************************** Dim itmX As ListItem Dim lvSI As ListSubItem Dim intIndex As Integer On Error GoTo ErrorRoutine Set itmX = LV.ListItems(RowNbr) itmX.ForeColor = RowColor For intIndex = 1 To LV.ColumnHeaders.Count - 1 Set lvSI = itmX.ListSubItems(intIndex) lvSI.ForeColor = RowColor Next
Set itmX = Nothing Set lvSI = Nothing Exit Sub
ErrorRoutine:
MsgBox Err.Description
End Sub
'para chamar ColorListviewRow ListView1, 1, vbBlue
|
|
|
|
|