Hello Timo, Yes, you're right. I must have missed those lines in the documentation.
Thanks again for your help. On Sun, Mar 6, 2011 at 12:43 PM, Timo <[email protected]> wrote: > Have you read the docs about set_justify()? It has 3 important parts in your > case. > Quote [1]: > |gtk.JUSTIFY_LEFT| is the default value when the widget is first created. If > you want to set the alignment of the label as a whole, use the > |gtk.Misc.set_alignment|() > <http://library.gnome.org/devel/pygtk/stable/class-gtkmisc.html#method-gtkmisc--set-alignment> > method instead. The |set_justify|() > <http://library.gnome.org/devel/pygtk/stable/class-gtklabel.html#method-gtklabel--set-justify> > has no effect on labels containing only a single line. > > * Your call to set_justify() does nothing, because you call the default > value. > * It wouldn't work anyway because you only have one line. > * The solution is to use set_alignment() > > So replace label.set_justify(gtk.JUSTIFY_LEFT) with label.set_alignment(0, > .5) and it should work. > > Cheers, > Timo > > [1] > http://library.gnome.org/devel/pygtk/stable/class-gtklabel.html#method-gtklabel--set-justify _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
