Sub Activity_Create(FirstTime As Boolean)
'demarre la page graphique
activity.LoadLayout ("designGRID")
'définit la longueur et largeur du bouton
Dim xPAN As Int : xPAN = panel1.Width / 4
Dim yPAN As Int : yPAN = panel1.Height / 5
' la boucle d'affichage des boutons en grille 4 x 5
Dim btnGRILLE(20) As Button
Dim index As Int : index = 0
For a = 0 To 3
For b = 0 To 4
btnGRILLE(index).Initialize ("btnGRILLE")
panel1.AddView(btnGRILLE(index), xPAN * a, yPAN * b , xPAN, yPAN)
btnGRILLE(index).Text = index ' ça sera remplacé par les éléments d'une liste
btnGRILLE(index).Tag = index
index = index+1
Next
Next
end sub