5

How can I change the format of the cell, which is currently being evaluated?

Nils
  • 127
  • 3

1 Answers1

5

One possibility is to use CellProlog/CellEpilog:

SetOptions[
    EvaluationNotebook[],
    StyleDefinitions -> Notebook[
        {
        Cell[StyleData[StyleDefinitions->"Default.nb"]],
        Cell[StyleData["Input"],
            CellProlog:>SetOptions[EvaluationCell[], Background->RGBColor[1,0,0]],
            CellEpilog:>SetOptions[EvaluationCell[], Background->None]
        ]
        },
        StyleDefinitions->"PrivateStylesheetFormatting.nb"
    ]
]
Carl Woll
  • 130,679
  • 6
  • 243
  • 355