Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

atribut justify in widget label

0 views
Skip to first unread message

Vaclav Snajdr

unread,
Feb 8, 2000, 3:00:00 AM2/8/00
to
Hi,

I am a new one in Tk:

label .l1 -text "abcde" -justify left -width 60
label .l2 -text "xxxxxxxxxxxxx" -justify left -width 60

grid .l1 ...
grid .l2 ....

the text appers in both cases in the centre of the label - the width
is constantly, because the text
is coming ffrom a file

What I do wrong ???

Thanks

Richard.Suchenwirth

unread,
Feb 8, 2000, 3:00:00 AM2/8/00
to snajdr...@t-online.de
"grid" by default centers the content in its cell. Use the -sticky
switch with compass letter(s) (n(orth), e(ast), w(est), s(outh)). For
left justification, say
grid .x -sticky w
--
Schoene Gruesse/best regards, Richard Suchenwirth - +49-7531-86 2703
RC DT2, Siemens Electrocom, Buecklestr. 1-5, D-78467 Konstanz,Germany
-------------- http://purl.org/thecliff/tcl/wiki//Richard*Suchenwirth

Ulrich Schöbel

unread,
Feb 8, 2000, 3:00:00 AM2/8/00
to
In article <389FF382...@t-online.de>,"atribut justify in widget label"

Vaclav Snajdr <0814138...@t-online.de> writes:
>
> label .l1 -text "abcde" -justify left -width 60
> label .l2 -text "xxxxxxxxxxxxx" -justify left -width 60
>
> the text appers in both cases in the centre of the label - the width
> is constantly, because the text

Hi Vaclav,

try

label .l1 -text "abcde" -anchor w -width 60

Best regards

Ulrich


0 new messages