A control that can determine how your app responds after a certain amount of time passes.

Description

Timers can, for example, determine how long a control appears or change other properties of a control after a certain amount of time has passed.

Key properties

Duration – How long a timer runs.

OnTimerEnd – How an app responds when a timer finishes running.

Repeat – Whether a timer automatically restarts when it finishes running.

Additional properties

Align – The location of text in relation to the horizontal center of its control.

AutoPause – Whether an audio or video clip automatically pauses if the user navigates to a different screen.

AutoStart – Whether an audio or video control automatically starts to play a clip when the user navigates to the screen that contains that control.

BorderColor – The color of a control's border.

BorderStyle – Whether a control's border is Solid, Dashed, Dotted, or None.

BorderThickness – The thickness of a control's border.

Color – The color of text in a control.

Disabled – Whether the user can interact with the control.

DisabledBorderColor – The color of a control's border if the control's Disabled property is set to true.

DisabledColor – The color of text in a control if its Disabled property is set to true.

DisabledFill – The background color of a control if its Disabled property is set to true.

Fill – The background color of a control.

Font – The name of the family of fonts in which text appears.

FontWeight – The weight of the text in a control: Bold, Semibold, Normal, or Lighter.

Height – The distance between a control's top and bottom edges.

HoverBorderColor – The color of a control's border when the user keeps the mouse pointer on that control.

HoverColor – The color of the text in a control when the user keeps the mouse pointer on it.

HoverFill – The background color of a control when the user keeps the mouse pointer on it.

Italic – Whether the text in a control is italic.

OnSelect – How the app responds when the user taps or clicks a control.

OnTimerStart – How an app responds when a timer starts to run.

PressedBorderColor – The color of a control's border when the user taps or clicks that control.

PressedColor – The color of text in a control when the user taps or clicks that control.

PressedFill – The background color of a control when the user taps or clicks that control.

Reset – Whether a control reverts to its default value.

Size – The font size of the text that appears on a control.

Start – Whether an audio or video clip plays.

Strikethrough – Whether a line appears through the text that appears on a control.

Text – Text that appears on a control or that the user types into a control.

Tooltip – Explanatory text that appears when the user hovers over a control.

Underline – Whether a line appears under the text that appears on a control.

Visible – Whether a control appears or is hidden.

Width – The distance between a control's left and right edges.

X – The distance between the left edge of a control and the left edge of the screen.

Y – The distance between the top edge of a control and the top edge of the screen.

Related functions

Refresh( DataSource )

Examples

Show a countdown

  1. Add a timer, and name it Countdown.

    Don't know how to add, name, and configure a control?

  2. Set the timer's Duration property to 10000 and its Repeat and Autostart properties to true.

  3. (optional) Make the timer easier to read by setting its Height property to 160, its Width property to 600, and its Size property to 60.

  4. Add a text box, and set its Text property to this formula:
    "Number of seconds remaining: " & RoundUp(10-Countdown.Value/1000, 0)

    Want more information about the RoundUp function or other functions?

    The text box shows how many seconds remain before the timer restarts.

  5. (optional) Set the timer's Visible property to false.

Animate a control

  1. Add a timer, and name it FadeIn.

    Don't know how to add, name, and configure a control?

  2. Set the timer's Duration property to 5000 and its Repeat and Autostart properties to true.

  3. (optional) Make the timer easier to read by setting its Height property to 160, its Width property to 600, and its Size property to 60.

  4. Add a text box, set its Text property to show Welcome! and set its Color property to this formula:
    ColorFade(Color.BlueViolet, FadeIn.Value/5000)

    Want more information about the ColorFade function or other functions?

    The text in the text box fades to white, returns to full intensity, and repeats the process.

  5. (optional) Set the timer's Visible property to false.