# visible indication that a cell is not evaluatable

Occasionally I make cells not evaluatable. Is there any way to have some sort of visible indication (automatic) that reminds me if a cell is not evaluatable.

One example of why I do this is that we have multiple environments: Production, UAT, and Development. I use different cells for each one, and only set the one I need to be evaluatable. Another example would be having test data that I need, for some of the time, but not for other times. I have, on occasion, run something with the wrong cell set up as evaluatable. I thought it might be helpful if there was a visual indicator, without having to lookup the cell properties, to remind me which cell is evaluatable.

• I suppose you mean some visible indication more obvious than the little horizontal bar added to the cell bracket (just below the top triangle) when you remove the Editable property ? – High Performance Mark Aug 12 at 18:48

Here's another stylesheet way:

Cell[
StyleData["Input"],
CellBracketOptions ->
{
"Color" ->
FEPrivateIf[
FEPrivateSameQ[
FrontEndCurrentValue[FrontEndEvaluationCell[], Evaluatable],
True
],
GrayLevel[.7],
GrayLevel[.9]
]
}
]


This makes the cell bracket very light if it can't be evaluated:

You could also make it darker or thicker or whatever you want. Check

Options[EvaluationCell[], CellBracketOptions]


to see what you can play with

You can make the cell appearance depend dynamically on it option values. For example, edit the stylesheet and add the options to the "Input" style:

Cell[StyleData["Input"],
CellDingbat ->
Dynamic[If[CurrentValue[EvaluationCell[], Evaluatable], None,
StyleBox["Ø", FontColor -> GrayLevel[0.7]]]]]


[You can see a little horizontal tick on the non-executable cell bracket, but I can't usually see those things anymore in the notebook, at least not reliably. Thanks @ HighPerformanceMark.]

• I'm having trouble getting this to work. First, the only way I know how to edit a style sheet, using the menu, I change options in the options inspector. So, I entered your code into a cell and executed it. Then when making a cell not evaluatable I did get that little line in the bracket. But changing the GrayLevel didn't make a difference. I also did not see the "Ø". I'm probably not applying your advice properly. – Mitchell Kaplan Aug 13 at 18:34
• @MitchellKaplan You can do it with the OptionInspector. It should look like this: i.stack.imgur.com/ISG10.png -- Or you can select the "Input" style in the stylesheet, execute the menu command Cell > Show Expression, and edit the text so that it looks like this: i.stack.imgur.com/ZG4av.png – Michael E2 Aug 13 at 19:08
• You can also go to Edit Stylesheet in the Format menu and copy that Cell expression in. – b3m2a1 Aug 13 at 19:36