> 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.
You must also anchor the packing. Try the following: from Tkinter import * master = Tk() w = Label(master, text="AAAAAAAAAAAAA BBBBBBBBBBBBBBBBBB", anchor=W, justify=LEFT) w.pack(anchor=W) w1 = Label(master, text="AAAAAAAAAAAAA ", anchor=W, justify=LEFT) w1.pack(anchor=W) master.mainloop() Regards, John _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss