MrKim Well-Known Member Licensed User Longtime User Apr 14, 2020 #1 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: Copy 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: Copy Dim pnl As B4XTableColumn = B4XTable1.GetColumn(ColumnId) Sleep(1500) pnl.Panel.Color = xui.Color_Blue
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: Copy 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: Copy Dim pnl As B4XTableColumn = B4XTable1.GetColumn(ColumnId) Sleep(1500) pnl.Panel.Color = xui.Color_Blue
Erel B4X founder Staff member Licensed User Longtime User Apr 14, 2020 #2 Best way to handle it yourself. Disable the built-in selection highlighting by setting the selection color to transparent and then implement your own selection logic in CellClicked. Upvote 0
Best way to handle it yourself. Disable the built-in selection highlighting by setting the selection color to transparent and then implement your own selection logic in CellClicked.