On 24/12/2023 14:50, Manfred Stelzhammer wrote:
I think "-justify center" should show the text on both (ttk::label and
label) in the center.
But it doesn't. Why.
As the manual page says, the -justify option relates to multi-line
strings: "If there are multiple lines of text, specifies how the lines
are laid out relative to one another". Relative to one another, not to
the label overall. Since your labels only have one line of text, the
-justify option has no effect.
To center the text on the labels you must use a different option:
-anchor. This should do what you want:
wm geometry . 400x200
pack [ttk::label .lab1 -anchor center -text testtext] -fill x
pack [label .lab2 -anchor center -text testtext] -fill x
Schelte.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)