#Region Module Attributes
#FullScreen: False
#IncludeTitle: True
#ApplicationLabel: 1
#VersionCode: 2
#VersionName: 1.01
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
Sub Process_Globals
End Sub
Sub Globals
Dim sv As ScrollView
End Sub
Sub Activity_Create(FirstTime As Boolean)
sv.Initialize(70dip * 10)
Activity.AddView(sv, 0, 0, 100%x, 100%y)
For i = 0 To 9
Dim p As Panel
p.Initialize("")
p.Tag = i
p.LoadLayout("2")
For v = 0 To p.NumberOfViews - 1
p.GetView(v).Tag = p 'set the panel as the Tag value
Next
sv.Panel.AddView(p, 0, i * 70dip, sv.Panel.Width, 60dip)
Next
End Sub
Sub button1_click 'handles all buttons
Dim b As Button
b = Sender
Dim p As Panel
p = b.Tag
Dim txt As EditText
txt = GetEditTextOfPanel(p)
Msgbox("text entered: " & txt.Text, "Panel #" & p.Tag)
End Sub
Sub GetEditTextOfPanel(p As Panel) As EditText
For i = 0 To p.NumberOfViews - 1
If p.GetView(i) Is EditText Then Return p.GetView(i)
Next
End Sub