I have a palette containing a Grid
with dynamics. As it runs it jiggles horizontally. Here's a minimal example:
CreatePalette[
Dynamic[Grid[{{"Some text of unknown length",
DateString["SecondShort"]}}, BaseStyle -> 15],
UpdateInterval -> 1], Saveable -> False]
I don't want to just set WindowSize
because I don't know the size before it's run, and unfortunately Grid
doesn't have like an ImageMargins
or ImagePadding
or anything like that. I'm sure there must be some simple way of doing this.
Pane
s of fixed widths help? e.g.Pane[DateString["SecondShort"], 20, FrameMargins -> 0, ImageMargins -> 0, ContentPadding -> False]
$\endgroup$Style[DateString["SecondShort"], FontFamily -> "Courier"]
$\endgroup$Pane
. For theStyle
idea, padding the string prevents the 59 -> 0 jiggle.Style[StringPadRight[DateString["SecondShort"], 2, " "], FontFamily -> "Courier"]
$\endgroup$