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
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 ...
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
The code above is correct and the table size doesn't matter. In debug mode, filling a large table can be slow when the code is "dirty". Clean it (Ctrl + P) and it will be fast.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.