CellDynamicExpression

CellDynamicExpression

is an option for cells that specifies an expression to be dynamically updated whenever the cell is visible on screen.

Details

  • CellDynamicExpression->Dynamic[expr] causes the expression to be tracked and updated in the usual way, except that expr is not displayed anywhere.
  • CellDynamicExpression may not trigger dynamic updates if the cell is scrolled off screen or inside a closed cell group.
  • The CellDynamicExpression dynamic is guaranteed to be resolved before any Dynamic objects that are in the cell's contents.

Examples

open allclose all

Basic Examples  (1)

Display the date:

Properties & Relations  (4)

CellDynamicExpression always resolves before any Dynamic objects in the cell's content:

Dynamic can be omitted from the right-hand side if :> is used:

Dynamic can be omitted from the right-hand side of CurrentValue if := is used:

As with any other Dynamic expression, Refresh may be used to control reevaluation:

Introduced in 2010
 (8.0)