Justifying text with the -width option

Joel Hammer joel
Mon May 17 11:57:36 PDT 2004


On Mon, Dec 29, 2003 at 12:49:38PM +0100, Roger Oberholtzer wrote:
> Hope you don't mind a few pointers (I personally always welcome them):
> 
> > set id [ open "|dir -1 " ]
> 
> set id [glob *]
> 

I love pointers. Without pointers, I can spend several hours missing
the point.

In the example above, I was just practicing with opening input streams. I
am really fooling around with pipelines, but when I posted my question
I wanted to kept it simple, so I substituted the |dir -1 pipeline instead.


> label .a.b.$i -text $name -width 30 -anchor w

This works just like I wanted. But, I was sure I tried this combination
of options before I posted by question. How come it works when you do it?

Well, I think this is referred to as the learning curve.
 
Thanks,

Joel





> > 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


More information about the Linux-users mailing list