Android Question Bold numeric column in B4XTable [Solved]

Francisco Gonzalez 1962

Member
Licensed User
Hello, I have a numeric 2D array displayed by a B4XTable. I want to show the data in the first column as Bold type. Please can you give me a hint?
Cheers
Francisco
 

mangojack

Well-Known Member
Licensed User
try this ..
B4X:
B4XTable1.MaximumRowsPerPage = 20
B4XTable1.BuildLayoutsCache(20)  
SetColumnBold("Name")
  
Sub SetColumnBold(columnID As String)
    Dim fnt As B4XFont = xui.CreateDefaultBoldFont(16)
    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).Font = fnt
    Next
End Sub
Anything more than this , you might want to study sub CreateCustomFormat in the Table example
B4XTable example ...
 

Francisco Gonzalez 1962

Member
Licensed User
Thanks for your help!
It works for small tables, but I found that when using the code and if the table is bigger (100 * 100 elements (double)) the program hangs and exits with an exception. I'll try to post an example later
Cheers
 
Top