Paul Miller
2017-04-01 15:31:05 UTC
I'd like to show a marker when text is clipped...
That is, given
t = urwid.Text(u'long text here mang', wrap='clip')
r = t.render( (11,) )
I'd like for r.text to be [ u'long text \u2026' ] instead of [ u'long text
h' ].
I looked at subclassing Text, TextCanvas, and various other things, and I
can't see any good place to inject this sort of thing.
I might be better off doing it to the input text, but sometimes the input
text is all full of formatting. Then I'd really like to rely on all these
cool subsystems that compute widths and layouts and just replace the last
character of the computed output text.
Seems like this wouldn't be all that hard, but it's apparently beyond my
skill level.
Anyone have any idea how to do this?
That is, given
t = urwid.Text(u'long text here mang', wrap='clip')
r = t.render( (11,) )
I'd like for r.text to be [ u'long text \u2026' ] instead of [ u'long text
h' ].
I looked at subclassing Text, TextCanvas, and various other things, and I
can't see any good place to inject this sort of thing.
I might be better off doing it to the input text, but sometimes the input
text is all full of formatting. Then I'd really like to rely on all these
cool subsystems that compute widths and layouts and just replace the last
character of the computed output text.
Seems like this wouldn't be all that hard, but it's apparently beyond my
skill level.
Anyone have any idea how to do this?
--
You received this message because you are subscribed to the Google Groups "Urwid Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urwid+***@excess.org.
To post to this group, send email to ***@excess.org.
For more options, visit https://groups.google.com/a/excess.org/d/optout.
You received this message because you are subscribed to the Google Groups "Urwid Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urwid+***@excess.org.
To post to this group, send email to ***@excess.org.
For more options, visit https://groups.google.com/a/excess.org/d/optout.