[pygtk] GtkTextView, wrapping long lines and indents problems

cwr at netcom.co.uk cwr at netcom.co.uk
Fri Nov 18 16:50:28 WST 2011


bQuoting Max Usachev <maxusachev at gmail.com>:

> Hello!
>
> I have a problem with long line in gtk.TextView.
> For example, if wrapping is set to gtk.WRAP_WORD and line is very long and
> contains 4 spaces at the start for example, then other wrapped lines
> started with position 0, not with 4 as the first line.
>
> Actual result:
> "    The long long long"
> "long long long line.."
>
> Expected result"
> "    The long long long"
> "    long long long .... "
>
> Is it possible to control the behaviour of wrapped lines?
>

The usual way to do this would be to reset the left margin with
the tag left_margin=NN where nn is the width in pixels.

Will





More information about the pygtk mailing list