Dim index As Int
index = clv4.GetItemFromView(Sender)
Dim pnl As B4XView
pnl = clv4.GetPanel(index)
But now I am getting this error
B4X:
java.lang.ClassCastException: class Almacen.swiftbutton cannot be cast to class javafx.scene.Node (Almacen.swiftbutton is in unnamed module of loader 'app'; javafx.scene.Node is in module javafx.graphics of loader 'app')
Private Sub SwiftButton1_Click
Dim swf As SwiftButton = Sender
Dim Index As Int = clv4.GetItemFromView(swf.mBase)
Dim pnl As B4XView
pnl = clv4.GetPanel(Index)
End Sub