This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Trigger

Trigger[Dynamic[u]]
represents a trigger that can be pressed to make the dynamically updated value of u be continually increased with time from 0 to 1.
Trigger[Dynamic[u], {umin, umax}]
makes u vary from umin to umax when triggered.
Trigger[Dynamic[u], {umin, umax, du}]
makes u vary in steps du when triggered.
Trigger[Dynamic[u], {umin, umax}, ups]
makes the value of u increase at a rate of ups units per second when triggered.
  • In Manipulate, ControlType->Trigger specifies that a particular variable should be controlled by a trigger.
  • The default duration after triggering for a variable to go through its range is 5 seconds.
  • Trigger[Dynamic[u], {umin, Infinity}] runs forever after being triggered, with u increasing by 1 every second.
  • The following options can be given:
AnimationRateAutomaticthe rate at which variables vary
AnimationRepetitions1how many times to run before stopping
AppearanceAutomaticthe overall appearance of the trigger object
AppearanceElementsAutomaticelements to include in the displayed trigger
Exclusions{}specific u values to exclude
DefaultDuration5.the default duration in seconds
DisplayAllStepsFalsewhether to force all discrete steps to be displayed
EnabledAutomaticwhether the trigger is enabled, or grayed out
ImageMargins0margins around the image of the displayed trigger
ImageSizeAutomaticthe overall image size of the displayed trigger
  • The following elements are included in a default trigger: "TriggerButton", "PauseButton", "ResetButton". These elements can be specified in any order in a list given as the setting for AppearanceElements. Additional possible elements include all the appearance elements for Animator.
Dynamically trigger a variable update:
Dynamically trigger a variable update:
In[1]:=
Click for copyable input
Out[1]=
New in 6