1
$\begingroup$

I can't quite seem to find a way to accomplish this task. I want to display an image in its own window with a custom title. This code almost accomplishes the task:

CreateDialog[
 {Image@Graphics[{Circle[]}]},
 
 WindowTitle -> "Circle",
 WindowFrameElements -> {"CloseBox", "ResizeArea", "MinimizeBox", 
   "ZoomBox"}
 ]

but there are ugly grey margins around the image.

This code gets rid of the grey margins:

CreateDialog[
 {Image@Graphics[{Circle[]}]},
 
 WindowTitle -> "Circle",
 WindowFrame -> "Normal",
 WindowFrameElements -> {"CloseBox", "ResizeArea", "MinimizeBox", 
   "ZoomBox"}
 ]

but now the title appends "- Wolfram Mathematica 13.2" in the title bar. How can I get rid of the grey margins in the output of the first example while retaining total control over the window title?

$\endgroup$
2
  • $\begingroup$ With 12.1 on a Mac, the title is just "Circle" for both snippets. $\endgroup$
    – Adam
    Commented Apr 2, 2023 at 18:25
  • $\begingroup$ Unfortunately, I am on Windows, with 13.2. Interesting note, however. $\endgroup$ Commented Apr 2, 2023 at 18:26

1 Answer 1

2
$\begingroup$

The solution to the margins is to use the

PlotRangePadding -> None

option in Graphics. Using this with the first example gives one control over the window title completely, so my problem is solved sufficiently.

$\endgroup$

Your Answer

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

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