CellDynamicExpression
セルのオプションで,そのセルがスクリーン上で可視である間は式が動的に更新されるように指定する.
詳細
- CellDynamicExpression->Dynamic[expr]とすると,expr がどこにも表示されない点を除き,通常の方法で式が追跡・更新される.
- CellDynamicExpressionは,式がスクロールされてスクリーンの外に出た場合,あるいは式が閉じたセルグループの中にある場合は,動的更新を引き起さないことがある.
- 動的なCellDynamicExpressionは,セルのコンテンツである任意のDynamicオブジェクトの前に必ず結合される.
例題
すべて開く すべて閉じる例 (1)
特性と関係 (4)
CellDynamicExpressionは,セルのコンテンツである任意のDynamicオブジェクトの前に必ず結合される:
x=.
CellPrint[ExpressionCell[Dynamic[Refresh[x, None]], "Print", CellDynamicExpression -> Dynamic[x = "from CellDynamicExpression"]]]:>が使われている場合はDynamicを右辺から削除することができる:
CellPrint[ExpressionCell[Dynamic[val], "Output", CellDynamicExpression :> (val = Now)]]:=が使われている場合は,CurrentValueの右辺からDynamicを削除することができる:
button = Button["change", CurrentValue[EvaluationCell[], CellDynamicExpression] := (val = 2)];
CellPrint[ExpressionCell[{Dynamic[val], button}, "Output", CellDynamicExpression :> (val = 1)]]他のDynamic式と同じように,Refreshを使って再評価を制御することができる:
CellPrint[ExpressionCell[Dynamic[val], "Output", CellDynamicExpression :> Refresh[val = Now, UpdateInterval -> 1]]]テキスト
Wolfram Research (2010), CellDynamicExpression, Wolfram言語関数, https://reference.wolfram.com/language/ref/CellDynamicExpression.html.
CMS
Wolfram Language. 2010. "CellDynamicExpression." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CellDynamicExpression.html.
APA
Wolfram Language. (2010). CellDynamicExpression. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CellDynamicExpression.html
BibTeX
@misc{reference.wolfram_2026_celldynamicexpression, author="Wolfram Research", title="{CellDynamicExpression}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/CellDynamicExpression.html}", note=[Accessed: 12-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_celldynamicexpression, organization={Wolfram Research}, title={CellDynamicExpression}, year={2010}, url={https://reference.wolfram.com/language/ref/CellDynamicExpression.html}, note=[Accessed: 12-August-2026]}