Dim p As Pane
p.Initialize("")
MainForm.RootPane.AddNode(p,0,0,MainForm.Width*.8,MainForm.Height*.8)
For y=0 To 2
For x=0 To 2
Dim b As Button
b.Initialize("btn")
Dim bXui As B4XView=b
bXui.Text=x &"-"& y
bXui.tag=x &"-"& y
p.AddNode(bXui,x*(p.prefWidth/3),y*(p.prefHeight/3),p.prefWidth/3,p.prefHeight/3)
Next
Next
Sub btn_Click
Dim b As B4XView=Sender
Log(b.Tag)
End Sub