Hi
I'm trying align a b4xtable cell text, but it's not working. Here is my code:
I'm trying align a b4xtable cell text, but it's not working. Here is my code:
B4X:
B4XTable1.MaximumRowsPerPage = 20
B4XTable1.BuildLayoutsCache(B4XTable1.MaximumRowsPerPage)
If xui.IsB4J Then B4XTable1.HighlightSearchResults = False
Dim idColumn As B4XTableColumn = B4XTable1.AddColumn("id", B4XTable1.COLUMN_TYPE_TEXT)
idColumn.Width = 60dip
SetColumnHorizontalAlignment(idColumn, "LEFT")
Dim nameColumn As B4XTableColumn = B4XTable1.AddColumn("Name", B4XTable1.COLUMN_TYPE_TEXT)
SetColumnHorizontalAlignment(nameColumn, "LEFT")
Dim imageColumn As B4XTableColumn = B4XTable1.AddColumn("Image", B4XTable1.COLUMN_TYPE_TEXT)
SetColumnHorizontalAlignment(imageColumn, "LEFT")
...
Private Sub SetColumnHorizontalAlignment(Col As B4XTableColumn, Alignment As String)
For i = 1 To Col.CellsLayouts.Size - 1
Dim p As B4XView = Col.CellsLayouts.Get(i)
p.GetView(Col.LabelIndex).SetTextAlignment("CENTER", Alignment)
Next
End Sub