Xojo.Core.Timer.Action

From Xojo Documentation

Event


Xojo.Core.Timer.Action()

Supported for all project types and targets.

Called when the Timer interval is reached, based on the Mode and Period properties.

Notes

Timer code always runs in the main thread, shared with UI updates. A long-running process called by a Timer can make the UI unresponsive. In these situations, use a Thread instead.

Sample Code

This code updates an iOSProgressBar:

ProgressBar1.Value = ProgressBar1.Value + 1

// Stop Timer when ProgressBar reaches maximum
If ProgressBar1.Value > ProgressBar1.MaxValue Then
Me.Mode = Xojo.Core.Timer.Modes.Off
End If