From Newsgroup: comp.lang.tcl
This is question from Harald that landed in a different thread,
so I post here again :
------------------ Q start ------------------
Buttons with multiple text lines:
pack [button .b2 -justify center -text ABC\nD]
may use the -justify option to center the lines.
Now ttk:
pack [ttk::button .b2 -justify center -text ABC\nD]
no option justify
ttk::style configure custom.Toolbutton -anchor center -justify center
pack [ttk::button .b -style custom.Toolbutton -text centered\n2]
no effect.
Is there a way to center the text?
This is Style Vista on MS-Windows...
Thanks for any idea,
Harald
--------------- Q end -----------------
What I saw is that styling works to center text in version 8.6 but not
in 9.0. In 9.1 we have "Eliminate the "xpnative" ttk style, in favor of "vista"",.
but cannot test it.
It seems even magic that -anchor center -justify center association works
in version 8.6 when the layout is only :
Button.button -sticky nswe -children {Button.focus -sticky nswe
-children {Button.padding -sticky nswe -children {Button.label -sticky nswe}}}
I take advantage of Harald's question to know if it exists somewhere a description
of how layout for each widget is described ? There are excellent theme such as clearlooks , ttkbootstrap or rdbende's themes that I keep wondering how they could be
be built with this lack of information.
Olivier.
--- Synchronet 3.22a-Linux NewsLink 1.2