Android Question B4XTable text alignment

Phayao

Active Member
Licensed User
Longtime User
Hello,

a silly question about the B4XTable library - in the designer the customview textalign is set to LEFT, but the cell contents are all horizontal central aligned.
I tried different ways to access the alignment property but it said it is not a compatible property (only for edittext, label etc. but NOT for the panel inside the cell).
Obviously there is a simple way but I could not really figure out the logic to access the cell properties in the table - a short answer is highly appreciated.
Thanks, Chris
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X:
B4XTable1.MaximumRowsPerPage = 20
B4XTable1.BuildLayoutsCache(B4XTable1.MaximumRowsPerPage)
For Each col As B4XTableColumn In B4XTable1.Columns
    For i = 1 To column.CellsLayouts.Size - 1        'starts at 1 due to header
        Dim pnl As B4XView = col.CellsLayouts.Get(i)
        pnl.GetView(0).SetTextAlignment("CENTER", "LEFT")
    Next
Next
 
Upvote 0
Top