[pygtk] gtk.label + wrapping
Yann Leboulanger
asterix at lagaule.org
Sun Feb 1 17:42:11 WST 2009
Gian Mario Tagliaretti wrote:
> On Fri, Jan 30, 2009 at 7:33 PM, Yann Leboulanger <asterix at lagaule.org> wrote:
>
> Hi Yann,
>
>> I have a gtk.Label, filled with a long text. I enabled wrap on this
>> label, so that text is splitted into several lines.
>>
>> The problem is that when I increase window width, the wrapping is not
>> re-computed.
>
> I had the same problem some time ago, I've stolen some code from
> libview and make it pure python, look at the WrapLabel class.
> http://www.gnome.org/~gianmt/busybox.py
>
> cheers
Thanks for the link, I was also given this one:
https://fedorahosted.org/python-slip/browser/slip/gtk/__init__.py
It's quite the same thing. It work nicely, except if label has xalign to
0.5.
--
Yann
More information about the pygtk
mailing list