Try something like this:I found no way to make columns be aligned left ( text ) or number (right)
'AVMCFD is the name of the column ' SetColumnAlignment("AVMCFD", "BOTTOM", "RIGHT") 'vert, hor ' SetColumnAlignment("AVMCFD", "TOP", "RIGHT") 'vert, hor ' SetColumnAlignment("AVMCFD", "CENTER", "LEFT") 'vert, hor SetColumnAlignment("AVMCFD", "CENTER", "RIGHT") 'vert, hor AVMCFD is the name of the column Sub SetColumnAlignment(columnID As String, alignmentV As String, alignmentH As String) Dim column As B4XTableColumn = B4XTable1.GetColumn(columnID) 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(alignmentV, alignmentH) Next End Sub
I will clarify this point. B4XTable creates the cells when needed. This means that when the table is resized more cells will be created. This is not an issue in B4A as the table is created and usually never resized (until the activity is recreated which means that the table is recreated as well).I dont think you have to repeatedly set the Alignment.. Only once when you have set your columns should do the trick.
B4XTable1.MaximumRowsPerPage = 20 B4XTable1.BuildLayoutsCache(B4XTable1.MaximumRowsPerPage)
You haven't understood my post. Reread it.Rows per page has nothing to interact with the columns width itself nor it shown data alignment.
It should be possible. I still don't understand the problem.fields ajusted left for text and right for numbers.
Not related to this thread but it is also possible: https://www.b4x.com/android/forum/threads/b4x-b4xtable-with-custom-cells-layout.102352/#post-642432possibility to add graphs into the columns is something wonderful !!!
You are right. I had put the call to align just after the call to set the column. I should have place it at the end of the initialization sub. There it works fine.I dont think you have to repeatedly set the Alignment.. Only once when you have set your columns should do the trick.