The following generates a Cell that returns the state of the checkbox when evaluated:
CellPrint[
ExpressionCell[
{DynamicModule[{val=True}
, Checkbox[
Dynamic[val, (val=#; SetOptions[EvaluationCell[], TaggingRules->{"value"->val}])&]
]
]
, Dynamic@CurrentValue[{TaggingRules,"value"}]
}
, TaggingRules->{"value"->True}
, Evaluatable->True
, CellEvaluationFunction->(CurrentValue[{TaggingRules,"value"}]&)]
]

Moving the checkbox into the frame label breaks the functionality. Why?
CellPrint[
ExpressionCell[
Dynamic@CurrentValue[{TaggingRules,"value"}]
, TaggingRules->{"value"->True}
, CellFrameLabels->
{
{ToBoxes[
DynamicModule[{val=True}
, Checkbox[
Dynamic[val, (val=#; SetOptions[Print[FullForm@EvaluationCell[]];EvaluationCell[], TaggingRules->{"value"->val}])&]
]
]
], None}
, {None,None}
}
, Evaluatable->True
, CellEvaluationFunction:>(Print[FullForm@EvaluationCell[]];CurrentValue[{TaggingRules,"value"}]&)]
]

Printing the EvaluationCell[] shows that SetOptions is setting the TaggingRules on the FrameLabel cell, not the main cell. How does one update the tagging rules of the main cell from within a frame?




