# Deploy and Deployed

I was trying to understand what happens when I insert Deployed -> True/False in an ExpressionCell but couldn't see a difference in most of the cases shown in the documentation.

First example:

ExpressionCell[{Graphics[Disk[]], Slider2D[]}, Deployed -> False]


I can't see what changes, if I change Deployed -> False to Deployed -> True. The slider can be moved in both cases.

Second example:

{Graphics[{Disk[], Inset[Slider2D[]]}], Deploy[Graphics[{Disk[], Inset[Slider2D[]]}]]}


I can't see a difference between the two Graphics objects.

Third Example:

{Panel["This text is selectable and editable"], Deploy[Panel["This text is not selectable or editable"]]}


This is the only example where I can see the difference.

• Have you tried that? I've just tried it and I can still rotate the graphic. May 18 at 14:17

[Note: I assumed CellPrint was necessary, which was wrong. I did not realize that ExpressionCell as output becomes an InterpretationBox. See end.]

### CellPrint[] on given example

For the given code, you can't edit the graphics with Deployed -> True. (Click on the graphics, then double click, then drag the disk around.) You also cannot resize the graphics or use Get Coordinates, the Drawing Tools, or other editing actions in the graphics context menu. I also cannot select any elements in the cell, although the slider responds to mouse-down and mouse-dragged events.

### Output cells

It's a bit more complicated if you use cell styles. The default "Output" style has GraphicsBoxOptions and Graphics3DBoxOptions that override Deployed to set it to False. To counter that, you need to add one or both of the following Cell options:

GraphicsBoxOptions -> {
DefaultBaseStyle -> {"Graphics", Deployed -> True}}

Graphics3DBoxOptions->{
DefaultBaseStyle -> {"Graphics3D", Deployed -> True}}


If you do not do this, then the cell will be deployed but the graphics editable. When the graphics are edited, the cell is converted to an "Input" cell and the Deployed option is removed.

Thus the following gives a deployed cell (but the slider still responds to mouse events):

ExpressionCell[{Graphics[Disk[]], Slider2D[]},
"Output", Deployed -> True,
GraphicsBoxOptions -> {DefaultBaseStyle -> {"Graphics",
Deployed -> True}}] // CellPrint


If we remove the cell option Deployed -> True, we get a regular cell with deployed graphics. However, if the cell is edited, it will be converted to an "Input" cell and un-deployed.

ExpressionCell[{Graphics[Disk[]], Slider2D[]},
"Output",(*Deployed->True,*)
GraphicsBoxOptions -> {DefaultBaseStyle -> {"Graphics",
Deployed -> True}}] // CellPrint


Other cell styles may be investigated as desired. I do not remember this happening several years back (overriding Deployed with box options), but maybe my memory is wrong. I don't have a way to check at this point.

### The given example without CellPrint[]

The raw ExpressionCell[..] results in an InterpretationBox[] in an output cell. The InterpretationBox[] is by default Editable -> False. Thus the graphics are not editable, no matter what the setting Deployed is. Below is the cell expression of the output:

ExpressionCell[{Graphics[Disk[]], Slider2D[]}, Deployed -> False]
(*
Cell[BoxData[
InterpretationBox[Cell[BoxData[
RowBox[{"{",
RowBox[{
GraphicsBox[DiskBox[{0, 0}]], ",",
Slider2DBox[{0.5, 0.5}]}], "}"}]]],
ExpressionCell[{
Graphics[
Disk[{0, 0}]],
Slider2D[]}]]], "Output",
CellChangeTimes->..., CellLabel->...]
*)


Since the example comes from the docs for Deployed, I would say it's a bad example to show how Deployed works. Since it's the only example, it's doubly bad.

You can play with the following to get something where Deployed has an effect:

ExpressionCell[{Graphics[Disk[]], Slider2D[]},
Deployed -> False (* True *),
Editable -> True]


I got it to give me the error:

INTERNAL SELF-TEST ERROR: Graphics2DEventTracker|cpp|207

• I can edit the graphics, no matter if it's Deployed->True or Deployed->False. I can change the size of the black disk, open the Drawing Tools, move the slider. May 18 at 14:48
• @Merlin I cannot edit the graphics with Deployed -> True. I can move the slider (as shown in the image). -- What system are you using (Windows, Mac, Linux, cloud/online)? May 18 at 14:55
• That's strange, I am using Mac. I get this orange square in your first picture for both versions of Deployed. May 18 at 15:51
• @Merlin I updated my answer to reflect subtleties that may apply to what code you're using. See if it conforms to your experience. If not, we probably need to see the code you're executing. I had been assuming one thing, but your different results suggests my initial assumption was wrong. May 18 at 18:15
• Thank you very much for your effort and the detailed answer! I don't have another code, I was actually just starting with the Wolfram Documentation of "Deployed" and tried the given examples (the ones that are described in my question) and wondered how it works because I couldn't see a difference (the only exception was the text cell example - the output was not selectable and editable). May 18 at 18:36