Hi, I'm using Erel's algoritm to set the left aligment of my B4XTable columns, however the text appears so close to the left that is uggly, the only padding that I can add is a space as a first character in my cell strings, but this maybe hinters the search speed. Is there's another way to add some padding to the left?
Thanks
Alejandro
B4X:
Private Sub AlineacionCelda(column As B4XTableColumn,alineacionVertical As String,alineacionHorizontal As String)
For i = 1 To column.CellsLayouts.Size - 1 'starts at 1 due to header
Dim pnl As B4XView = column.CellsLayouts.Get(i)
pnl.GetView(0).SetTextAlignment(alineacionVertical,alineacionHorizontal)
Next
End Sub
Sub B4XTable1_DataUpdated
SetAlignment
End Sub
Private Sub SetAlignment
Dim col1 As B4XTableColumn = B4XTable1.GetColumn("Name")
For i = 1 To col1.CellsLayouts.Size - 1
Dim p As B4XView = col1.CellsLayouts.Get(i)
p.GetView(0).SetTextAlignment("CENTER", "LEFT")
p.GetView(0).SetLayoutAnimated(0, 5dip, 0, p.Width - 10dip, p.Height)
Next
End Sub