Yes thanks for the reply, That is similar to what I am trying to do but the ID is a string, I need it as the number for addressing the column in a loop
Are you looking to color the cell panel with a certain color based on the numeric content of that cell. if so, it can be done. Jack, you might want to show the code you are trying to manipulate and explain exactly and in detail what you want to achieve. I think you will get more precise help and less conjecture.
Are you looking to color the cell panel with a certain color based on the numeric content of that cell. if so, it can be done. Jack, you might want to show the code you are trying to manipulate and explain exactly and in detail what you want to achieve. I think you will get more precise help and less conjecture.
Thanks for the reply
It is based on a comparison of 2 cells in a row, not adjacent
I have found a workaround, it's not elegant but it does work. I do a comparison early in the data loading and store any differences in an array
B4X:
Sub SetCellColor
Dim c As B4XTableColumn
For x = 1 To 36
Dim i As Int =0
For Each c As B4XTableColumn In B4XTable1.VisibleColumns
Dim pnl As B4XView = c.CellsLayouts.Get(x)
If Errors(x,i)<>"" Then
pnl.Color = xui.Color_Cyan
End If
i=i+1
Next
Next
End Sub
If you are comparing the contents of 2 cells in a given row not necessarily adjacent, you can always add another column to the B4XTable that represents the difference between those 2 cells you are comparing. Based on the value of the difference, you can then highlight the row or any given cell in that row. No need to respond if this answer is irrelevant to your situation.
If you are comparing the contents of 2 cells in a given row not necessarily adjacent, you can always add another column to the B4XTable that represents the difference between those 2 cells you are comparing. Based on the value of the difference, you can then highlight the row or any given cell in that row. No need to respond if this answer is irrelevant to your situation.
Thank you Mahares, yes this would work, I did in fact take a similar approach with a different problem and hiding the column. It would be a lot easier if I could in fact access a cell directly with (row,cell) syntax rather than by the column's title especially in my case where the titles are generated by the code and there often is titles of the same name. Such is life, maybe at a later date this will be available
This thread will be used by Erel, Melamoud and myself to discuss / post new releases of the Table class. The table class is a flexible UI component that enable scrollable table like UI, with sortable columns, multiselect rows etc the table is very efficient, maintaining labels only for visible...
www.b4x.com
There is a complete example using the latest table class: 3.30 on the far right of the first post. You can import data into it from SQLite, CSV, etc. It is also vertically scrollable. You cannot do it with B4XTable because the rowids , although unique, can change from display to another and you have to have column names or ids.