How can I stop this Timer when all controls take own start position?
I was trying anything but can't found the solution
I was trying anything but can't found the solution
B4X:
Sub Globals
Dim controls(0)
Dim controlsPos(100)
End Sub
Public Sub ControlsSlide (Target)
contTarget = "main."&Target
controls() = GetControls(contTarget)
For i = 0 To ArrayLen(controls())-1
controlsPos(i) = Control(controls(i)).Top
Control(controls(i)).Top = 0
Next
contTimIn.Interval = 20
contTimIn.Enabled = True
Control(contTarget,Form).Show
End Sub
Sub contTimIn_Tick
For i = 0 To ArrayLen(controls())-1
If Control(controls(i)).Top < controlsPos(i) Then
Control(controls(i)).Top = Control(controls(i)).Top + 10
Else
Control(controls(i)).Top = controlsPos(i)
End If
Next
End Sub