Manfred Stelzhammer schrieb am Sonntag, 24. Dezember 2023 um 12:58:16 UTC+1:
Hi
##
wm geometry . 400x200
pack [ttk::label .lab1 -justify center -text testtext] -fill x
pack [label .lab2 -justify center -text testtext] -fill x
##
The text from .lab1 is on the right site.
The text from .lab2 is on the center.
Why this different behavior.
Do I something wrong.
regards and merry xmas
Manfred
#label != ttk::label
package require Tk
##
#https://www.tcl.tk/man/tcl/TkCmd/label.html #https://www.tcl.tk/man/tcl/TkCmd/ttk_label.html
wm geometry . 400x200
pack [ttk::label .lab1 -justify center -text "testtext 1"] -fill x
pack [ttk::label .lab2 -justify center -text "testtext 2"] -fill x
pack [label .lab3 -justify center -text "testtext 3"] -fill x
pack [label .lab4 -justify center -text "testtext 4"] -fill x
##
Gregor
I think "-justify center" should show the text on both (ttk::label and
label) in the center.
But it doesn't. Why.
wm geometry . 400x200
pack [ttk::label .lab1 -anchor center -text testtext] -fill x
pack [label .lab2 -anchor center -text testtext] -fill x
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 297 |
Nodes: | 16 (2 / 14) |
Uptime: | 33:02:48 |
Calls: | 6,669 |
Calls today: | 1 |
Files: | 12,216 |
Messages: | 5,338,282 |