Hello there,
I use B4Xtable to display information.
In the event "Sub B4XTable1_DataUpdated" I use the following to color
It works, but only for rows that contain some "cEst" information. For those empty rows, keep the color of the previous page, do not put the color determined in "B4XTable1.EvenRowColor" or "B4XTable1.OddRowColor"
How can I update the original colors for cases where there is no registration or row information?
I use B4Xtable to display information.
In the event "Sub B4XTable1_DataUpdated" I use the following to color
B4X:
btnNext.Enabled = B4XTable1.lblNext.Tag
btnPrev.Enabled = B4XTable1.lblBack.Tag
XSelections.Refresh
'Log("Filas: " & B4XTable1.VisibleRowIds.Size)
'Recorro todas las FILAS visibles...
For i = 0 To B4XTable1.VisibleRowIds.Size - 1
Dim RowId As Long = B4XTable1.VisibleRowIds.Get(i)
If RowId > 0 Then
Dim pnl_Not As B4XView = Col_Nota.CellsLayouts.Get(i + 1) '+1 la primera celda es el Header
Dim pnl_Est As B4XView = Col_Estado.CellsLayouts.Get(i + 1) '+1 la primera celda es el Header
Dim pnl_Fec As B4XView = Col_Fecha.CellsLayouts.Get(i + 1) '+1 la primera celda es el Header
Dim row As Map = B4XTable1.GetRow(RowId)
Dim cEst As String = row.Get(Col_Estado.Id) 'Obtengo el contenido de la Columna/Fila
pnl_Not.GetView(0).TextSize = 16/Main.pSysFontScale
pnl_Est.GetView(0).TextSize = 16/Main.pSysFontScale
pnl_Fec.GetView(0).TextSize = 14/Main.pSysFontScale
Log("cEst: [" & cEst & "]")
If cEst = "P" Then
pnl_Not.GetView(0).SetColorAndBorder(xui.Color_RGB(225,180,43),1,xui.Color_Gray,0) 'NaranjaLindo
pnl_Est.GetView(0).SetColorAndBorder(xui.Color_RGB(225,180,43),1,xui.Color_Gray,0)
pnl_Fec.GetView(0).SetColorAndBorder(xui.Color_RGB(225,180,43),1,xui.Color_Gray,0)
Else If cEst = "O" Then
pnl_Not.GetView(0).SetColorAndBorder(xui.Color_RGB(21,148,9),1,xui.Color_Gray,0) 'VerdeDuro
pnl_Est.GetView(0).SetColorAndBorder(xui.Color_RGB(21,148,9),1,xui.Color_Gray,0)
pnl_Fec.GetView(0).SetColorAndBorder(xui.Color_RGB(21,148,9),1,xui.Color_Gray,0)
Else If cEst = "H" Then
pnl_Not.GetView(0).SetColorAndBorder(xui.Color_RGB(168,216,223),1,xui.Color_Gray,0) 'CelesteBonito
pnl_Est.GetView(0).SetColorAndBorder(xui.Color_RGB(168,216,223),1,xui.Color_Gray,0)
pnl_Fec.GetView(0).SetColorAndBorder(xui.Color_RGB(168,216,223),1,xui.Color_Gray,0)
End If
End If
Next
It works, but only for rows that contain some "cEst" information. For those empty rows, keep the color of the previous page, do not put the color determined in "B4XTable1.EvenRowColor" or "B4XTable1.OddRowColor"
How can I update the original colors for cases where there is no registration or row information?