#Region Shared Files
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
#End Region
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
Sub Class_Globals
    Private Root As B4XView
    Private xui As XUI
    Private fx As JFX
    Private ListView1 As ListView
    Private Button1 As Button
End Sub
Public Sub Initialize
'    B4XPages.GetManager.LogEvents = True
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Private Sub Button1_Click
    ListView1.Items.Clear
    For i = 0 To 10
        Dim l As Label
        l.Initialize("l")
        l.Text = "Riga " & i
        ListView1.Items.Add(l)
    Next
End Sub
Private Sub l_MouseClicked (EventData As MouseEvent)
    If EventData.ClickCount = 3 Then
        Dim l As Label = Sender
        l.TextColor = fx.Colors.RGB(255,0,0)
    End If
End Sub