1
$\begingroup$

Is there a way to keep Graphics3D objects manipulable when they are embedded in a Dialog window (CreateDialog,DialogInput, etc)?

I am aware that CreateDialog sets Deployed->True by default. Setting Deployed->False allows the rotation cursor to appear on mouseover, but the object still does not respond to interaction. Is there a way to restore interactivity?

$\endgroup$

1 Answer 1

2
$\begingroup$

You need to make it Selectable:

DialogInput[
  Graphics3D[Cuboid[]
  , SphericalRegion -> True
  , BaseStyle -> {Selectable -> True, Deployed -> False} (*!*)
  ]
]

Deployed is used too as it interferes with Selectable.

$\endgroup$
3
  • $\begingroup$ Aha! Very interesting, and as you said, just what I needed. Thanks! $\endgroup$
    – bdot
    Jan 24, 2015 at 2:51
  • 1
    $\begingroup$ It may also be more aesthetically pleasing to use SphericalRegion -> True $\endgroup$ Jan 25, 2015 at 5:30
  • 1
    $\begingroup$ Another incremental improvement: wrapping the Graphics3D inside a Grid (or similar) and setting Selectable->True for that Grid is preferable, as it removes the undesirable side effect of the rest of the dialog window being selectable. Mike, thanks for the tip re: SphericalRegion->True. Combining this with RotationAction->"Clip" produces an aesthetically pleasing result that does not attempt to resize the window when the Graphics3D is rotated. $\endgroup$
    – bdot
    Jan 26, 2015 at 1:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.