Justifying text with the -width option

Kurt Wall kwall
Mon May 17 11:57:35 PDT 2004


In a 0.7K blaze of typing glory, Joel Hammer wrote:
> I am having trouble getting text justified or anchored to the left when
> a width parameter is used.
> 
> This snippet works fine except if a width option is added to the label
> command, as is shown here. All the text is then centered in the label
> box. Any insight appreciated.
> 
> Thanks,
> 
> Joel
> 
> set id [ open "|dir -1 " ]
> set i 0
> frame .a.b
> while { [gets $id f ] >= 0} {
> label .a.b.$i -text $f -width 30
>                          ^
>                       The Problem
> pack .a.b.$i -anchor w
> incr i }
> pack .a.b

Tcl?

K
-- 
"What I've done, of course, is total garbage."
		-- R. Willard, Pure Math 430a


More information about the Linux-users mailing list