B4J Question Questions about B4XTable

MrKim

Well-Known Member
Licensed User
Longtime User
A couple of questions.
I figured out how to set the color of a column in DataUpdated. The problem is when you click on it it reverts back to the default color. I tried setting it back in the cellclicked event but it doesn't work. I do want to keep the behaviorv(flicker?) that shows the cell has been clicked.
I put this code in the for loop of Dataupdated to set the color:
B4X:
        pnl = NameCol.CellsLayouts.Get(i + 1)
        Dim X As B4XView = pnl.GetView(0)
        pnl.Color = xui.Color_Blue
        X.TextColor = xui.Color_White

I tried this in the CellClicked event but it did not work:
B4X:
    Dim pnl As B4XTableColumn = B4XTable1.GetColumn(ColumnId)
    Sleep(1500)
    pnl.Panel.Color = xui.Color_Blue
 
Top