When coding in notebook, I'm trying to show result(s) in a Single Notbook Dialog by this,
fPreview[content_,opts : OptionsPattern[]] :=
CreateDialog[
Pane[content,
ImageSize -> {500-10, 600-20},
Scrollbars -> True,
AppearanceElements -> None,
Alignment -> Center],
WindowTitle -> "Preview" <> " " <> ToString@Head@content,
WindowSize -> {500, 600},opts]
i.e.
fPreview@Plot[Sin[x],{x,-4,4}]
fPreview@Plot3D[Sin[x y],{x,-4,4},{x,-4,4}]
but once fPreview applied, there be a new Notebook Dialog, so I wonder how to modify the upper codes so that there be only One Notebook Dialog instance displaying the latest content(s)? Thanks!
$FailedwhenfPreviewexecuted a second time if theNotebook Dialogcreated at the first time was closed, I try to fix it but get failure. – Jerry Jan 29 '19 at 15:25