Reputation: 13
I'm working on a Tkinter application with a Canvas
and a create_text
object drawn on top of this Canvas
.
This text object word wraps automatically through the width
property. However, I would like this text to automatically clip the top line of the text when the text object wraps to a 4th line.
So go from this:
aaaa
bbbbbb
cccc
dddddd <- incoming new text
To this:
bbbbbb
cccc
dddddd
Any good way to do this?
Upvotes: 0
Views: 692
Reputation: 2588
You can simply scroll the Text widget.
See the code here: https://github.com/decadenza/blondieautoscroll
Upvotes: 0
Reputation: 386240
Any good way to do this?
No, there is no way to cause canvas text items to clip the way you want.
Upvotes: 1