iOS Question Click event on scrollview

Pablo Torres

Active Member
Licensed User
Longtime User
I have an scrollview and I filled it with several panels, when I click in one of those panels, how do I capture the click event?
I have no idea how to do that in B4i
 

Pablo Torres

Active Member
Licensed User
Longtime User
Can't get it done

this is the code i use to fill the scrollview called scrInicio

B4X:
  Dim intTamaño As Int
  intTamaño=0
  scrInicio.Panel.RemoveAllViews
  If Destacados.Size>0 Then
     For i=0 To Destacados.Size-1
        Dim EsteResto As Restaurant
        EsteResto=Destacados.Get(i)
        Dim miPanel As Panel
        If EsteResto.Logo.Length>0 Then
            If File.Exists(File.DirDocuments,ObtenerNombreFoto(EsteResto.Logo)) Then
                miPanel=modProcedures.ObtenerPanelRestaurantconImagen(EsteResto,CStr(i),100%x-6dip,100dip,"lDestacados")
            Else
                miPanel=modProcedures.ObtenerPanelRestaurant(EsteResto,CStr(i),100%x-6dip,100dip,"lDestacados")
            End If
        Else
            miPanel=modProcedures.ObtenerPanelRestaurant(EsteResto,CStr(i),100%x-6dip,100dip,"lDestacados")
        End If
    scrInicio.Panel.AddView(miPanel,3,intTamaño,100%x-6dip,100dip)
    intTamaño=intTamaño+103dip
     Next
  scrInicio.ContentHeight=intTamaño-3dip
  End If
[\code]

can you show me how to catch the click event to know the number of the panel that is clicked?
Thanks so much
 
Upvote 0

aarroyo

Member
Licensed User
Longtime User
I'm creating a horizontal calendar, adding a panel for each day to a scrollview, I need to capture the click of the selected panel
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…