[Tkinter-discuss] re garding labels alignment in PyTkinter GUI
Lakshmi Narayana
kodavali.lakshmi at gmail.com
Fri Jul 4 08:44:58 CEST 2008
Hari Om,
Here iam facing one problem is i created more than one labels
which have different lengths.
All labels text are displaying(aligned) in center based on
longest label length. (I am not require any textwrapping)
So how can i aligne all labels text from left side means left
justify.
Example code is:
-------------------------------------------------
from Tkinter import *
master = Tk()
w = Label(master, text="AAAAAAAAAAAAA BBBBBBBBBBBBBBBBBB", anchor=W,
justify=LEFT)
w.pack()
w1 = Label(master, text="AAAAAAAAAAAAA ", anchor=W, justify=LEFT)
w1.pack()
mainloop()
----------------------------------
Output producing is : AAAAAAAAAAAAA BBBBBBBBBBBBBBBBBB
AAAAAAAAAAAAA
But i require like this : AAAAAAAAAAAAA BBBBBBBBBBBBBBBBBB
AAAAAAAAAAAAA
Kindly help me to solve this problem:
Iam very thankful if i got output like this.
By urs friend
Lakshminarayana.
--
View this message in context: http://www.nabble.com/regarding-labels-alignment-in-PyTkinter-GUI-tp18273808p18273808.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.
More information about the Tkinter-discuss
mailing list