ControlActive
ControlActive[act,norm]
evaluates to act if a control that affects act is actively being used, and to norm otherwise.
Details
- ControlActive can be used to switch between a faster computation to be done while controls like sliders are being moved, and a slower computation to be done once the controls are released.
- ControlActive[act,norm] can also be used to trigger evaluation of norm when controls are released.
- ControlActive[] is equivalent to ControlActive[True,False].
- ControlActive[act,norm] is effectively equivalent to If[$ControlActiveSetting,act,norm].
Examples
open allclose allScope (2)
The arguments of ControlActive can be any expression:
Use ControlActive to switch between a low-resolution and a high-resolution version:
Applications (2)
Properties & Relations (2)
By using the second argument of Dynamic, you can get an effect similar to ControlActive:
Plot functions effectively use ControlActive for the PerformanceGoal setting:
Text
Wolfram Research (2007), ControlActive, Wolfram Language function, https://reference.wolfram.com/language/ref/ControlActive.html.
CMS
Wolfram Language. 2007. "ControlActive." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ControlActive.html.
APA
Wolfram Language. (2007). ControlActive. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ControlActive.html