Sub Globals
Dim panel(5) As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
For i=0 To 4
panel(i).Initialize("panel")
panel(i).Color = Colors.red
Activity.AddView(panel(i),0,0,100%x,100%y)
Dim lbl As Label
lbl.Initialize("")
lbl.Text = "page " & (i+1)
panel(i).AddView(lbl,0,50dip,100%x,30dip)
Next
Elevation(1) ' this code show panel view index (start 1 to 5)
End Sub
Sub Elevation(Priority)
Priority=Priority-1
For i=0 To 4
If i<>Priority Then
panel(i).SendToBack
End If
Next
panel(Priority).BringToFront
End Sub