Sub CreateTable (Files As List)
B4XTable1.AllowSmallRowHeightModifications = False
B4XTable1.RowHeight = 120dip
Sleep(0)
B4XTable1.SearchField.TextField.Enabled = False
For i = 0 To NumberOfColumns - 1
B4XTable1.AddColumn(i, B4XTable1.COLUMN_TYPE_TEXT)
Next
'Force the creation of the cells.
B4XTable1.MaximumRowsPerPage = 4
B4XTable1.BuildLayoutsCache(B4XTable1.MaximumRowsPerPage)
For Each col As B4XTableColumn In B4XTable1.Columns
col.Sortable = True 'False
col.Width = 100%x / NumberOfColumns
For i = 0 To col.CellsLayouts.Size - 1
Dim pnl As B4XView = col.CellsLayouts.Get(i)
pnl.GetView(0).Visible = False 'hide the label
If i > 0 Then 'i = 0 is the header
Dim iv As ImageView
iv.Initialize("")
pnl.AddView(iv, 2dip, 2dip, col.Width - 4dip, B4XTable1.RowHeight - 4dip)
End If
Next
Next
LoadData(Files)
B4XTable1.mBase.Visible = True
End Sub