Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private button1 As Button
Private TextField1 As TextField
Private TextField2 As TextField
Private TextField3 As TextField
Private pnl As Panel
Dim index As Int
End Sub
Private Sub Application_Start (Nav As NavigationController)
'SetDebugAutoFlushLogs(True) 'Uncomment if program crashes before all logs are printed.
NavControl = Nav
Page1.Initialize("TextFields")
Page1.Title = "Dashboard"
Page1.RootPanel.LoadLayout("TextFields")
NavControl.ShowPage(Page1)
End Sub
Sub Button1_Click
Dim counter As Int
counter = index +1
For Each v As View In pnl.getallviewsrecursive
If(v Is TextField)Then
If(v.tag = counter )Then
Dim txtf As TextField = v
txtf.requestfocus
index = index +1
End If
End If
Next
End Sub