' Note:
' 1 - you should first set BuildLayoutsCache, like:
' B4XTable1.MaximumRowsPerPage = 10
' B4XTable1.BuildLayoutsCache(B4XTable1.MaximumRowsPerPage)
'
' 2 - for XCLMN_PROP_COLORANDBORDER, pass a map with BAC_ constants as keys:
' SetColumnCellProps(B4XTable1, 0, CreateMap(CAB_BGCOLOR:xui.Color_LightGray))
Sub SetColumnCellProps(xTable As B4XTable, ColumnIndex As Int, Properties As Map)
Dim xColumn As B4XTableColumn = xTable.Columns.Get(ColumnIndex)
For i = 1 To xColumn.CellsLayouts.Size - 1
Dim pnl As B4XView = xColumn.CellsLayouts.Get(i)
Dim lbl As Label = pnl.GetView(0)
Dim xLbl As B4XView = lbl
' Here set the lbl properties.
Dim PropName As String
Dim PropValue As Object
For Each PropName As String In Properties.Keys
PropValue = Properties.Get(PropName)
Select PropName
Case XCLMN_PROP_TEXTSIZE
lbl.TextSize = PropValue
Case XCLMN_PROP_FONT
xLbl.Font = PropValue
Case XCLMN_PROP_TEXTCOLOR
xLbl.TextColor = PropValue
Case XCLMN_PROP_PADDING
#If B4A
lbl.Padding = PropValue
#End If
Case XCLMN_PROP_COLORANDBORDER
Dim mCAB As Map = PropValue
xLbl.SetColorAndBorder(mCAB.GetDefault(CAB_BGCOLOR, xui.Color_White), _
mCAB.GetDefault(CAB_BWIDTH, 1), _
mCAB.GetDefault(CAB_BCOLOR, xui.Color_Black), _
mCAB.GetDefault(CAB_BCRADIUS, 0))
End Select
Next
Next
End Sub