[Tutor] Tkinter: justify label

Bernard Lebel 3dbernard at gmail.com
Tue Jul 19 20:35:40 CEST 2005


Hello,

Can you specify a justification for a label widget? I'm reading there
is a justify option available on this page:

http://www.pythonware.com/library/tkinter/introduction/x611-text-formatting.htm

Although I don't know if this option works for label.



If I try
	
	for sField in tFields:
		
		row = Frame( oRoot )
		
		label = Label( row, width = 25, justify = LEFT, text = sField )
		entry = Entry( row, width = 50, relief = RIDGE )
		
		row.pack( side = TOP, fill = X )
		label.pack( side = LEFT )
		entry.pack( side = RIGHT, expand = YES, fill = X )



Nothing happens. However, if I put the justify option in the
label.pack() call, then I get an error that I'm using an invalid
option.



Thanks
Bernard


More information about the Tutor mailing list