Justifying text with the -width option
Roger Oberholtzer
roger
Mon May 17 11:57:32 PDT 2004
On Mon, 2003-12-29 at 01:25, 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
>
Hope you don't mind a few pointers (I personally always welcome them):
> set id [ open "|dir -1 " ]
set id [glob *]
> set i 0
> frame .a.b
> while { [gets $id f ] >= 0} {
foreach {name} {id} {
> label .a.b.$i -text $f -width 30
> ^
> The Problem
label .a.b.$i -text $name -width 30 -anchor w
> pack .a.b.$i -anchor w
> incr i }
> pack .a.b
> _______________________________________________
> Linux-users mailing list
> Linux-users at smtp.linux-sxs.org
> Unsubscribe/Suspend/Etc -> http://smtp.linux-sxs.org/mailman/listinfo/linux-users
>
More information about the Linux-users
mailing list