https://foro.gambas-es.org/viewtopic.php?f=1&t=6400&p=38355#p38355
-----------------------------------
v3ctor
Viernes, 26 May 2017, 01:12

Capturar Evento Click En Botones Contenidos En Scrollview?
-----------------------------------
Hola gamberos!

ando con un problemita, no se como capturar el evento click del botón x dentro de un scrollview?

alguien sabe como?



 [img]https://foro.gambas-es.org/files/images/2261/capturareventoclic.png[/img] 

[code linenumbers=false syntax=gambas]

' Gambas class file

Private $Lista As New String[]


Public Sub Lista(lista As String[])
  
  $Lista = lista
  Me.ShowModal()
  
End



Public Sub btnCerrar_Click()

  Me.Close

End

Public Sub Form_Open()
  Dim boton As Button
  Dim vers As String
  
  For Each vers In $Lista
    boton = New Button(ScrollView1) As "boton"
    boton.Text = vers
  Next
  

End


Private Sub boton_Click()
  
  Print Last.Text
  
End

Public Sub ScrollView1_MouseUp()

  Print Last.Text

End[/code]


