[Tutor] Left Alignment -- Tkinter

W W srilyk at gmail.com
Thu Apr 2 12:40:36 CEST 2009


On Wed, Apr 1, 2009 at 11:20 PM, Wayne Watson
<sierra_mtnview at sbcglobal.net>wrote:

>  Alan, the game changed in the thread you branched away from to other
> considerations. As stated there, I've thrown in the towel, but first let me
> say what the game was about. Here's the simplest example. Say I have four
> labels: small, big, house, cat, tree, and I want to put them in a column
> with full left justification. That is, like this:
>
> small
> big
> house
> cat
> tree
>
> What I get is:
>  small
>    big
>  house
>    eat
>   tree
>
> More or less centered. There seems to be no way to make left justify
> happen. Once an entry is placed to the right of these items, and another
> label+entry to the right of them, it gets weird.<snip>
>

Did you get my discovery about anchor + width?

     Actually, it turns out to be my mistake at not clearly reading the
documentation he has for the
     justify option. Justify is for multiple lines of text, anchor will
anchor the text. Try with width=30,
     anchor=W and you should see what you're looking for.

HTH,
Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090402/b5678dd5/attachment.htm>


More information about the Tutor mailing list