column = B4XTable1.AddColumn("Number Example 3", B4XTable1.COLUMN_TYPE_NUMBERS)
Dim data As List = su.LoadCSV2(File.DirAssets, "us_counties.csv", ",", headers)
B4XTable1.MaximumRowsPerPage = 20
B4XTable1.BuildLayoutsCache(B4XTable1.MaximumRowsPerPage)
For i = 1 To column.CellsLayouts.Size - 1
Dim p As B4XView = column.CellsLayouts.Get(i)
Dim Touch As B4XView = xui.CreatePanel("Touch")
Touch.Color =xui.Color_Transparent
Touch.Tag = i - 1
p.AddView(Touch, 0, 0, p.Width, p.Height)
Next
B4XTable1.SetData(data)
Sub B4XTable1_DataUpdated
For i = 1 To column.CellsLayouts.Size - 1
Dim p As B4XView = column.CellsLayouts.Get(i)
Dim Touch As B4XView = p.GetView(1)
Touch.SetLayoutAnimated(0, 0, 0, p.Width, p.Height)
Next
End Sub
Private Sub Touch_MouseClicked (EventData As MouseEvent)
Dim p As B4XView = Sender
Dim RowNumber As Int = p.Tag
Dim RowId As Long = B4XTable1.VisibleRowIds.Get(RowNumber)
If RowId > 0 Then
Dim value As String = B4XTable1.GetRow(RowId).Get(column.Id)
If EventData.ClickCount = 2 Then
Log($"Double click: ${value}"$)
Else
Log($"Single click: ${value}"$)
End If
End If
EventData.Consume
End Sub