private Sub sbHazBotones2
Dim Nombres() As String
Dim i, Y, Alto, Separacion As Int
Alto=60dip
Separacion=2dip
Nombres=Array As String("PROFILO","STORICO BUDNI","IMPOSTAZIONI","TUTORIAL/HELP","FAQ")
pnBotones.Height=Nombres.Length*Alto+(Nombres.Length-1)*Separacion
pnBotones.Color=Colors.Transparent
Y=0
For i=0 To Nombres.Length-1
Dim Pn As B4XView=xui.CreatePanel("pnBoton")
pnBotones.AddView(Pn,0,Y,pnBotones.Width,Alto)
Pn.Tag=Nombres(i)
Y=Y+Alto+Separacion
Pn.LoadLayout("lyBoton")
Pn.Color=Colors.White
Dim Lbl As B4XView=Pn.GetView(0)
Lbl.Text=Nombres(i)
Next
End Sub
Sub pnBoton_Click
Dim Pn As Panel
Pn=Sender
Log(Pn.Tag)
End Sub