Let's say I have a text widget called self.txt
. I also have a scrollbar, called scroll
.
I have configured the scrollbar to work with self.txt
, but I need the Text
widget to stay scrolled down, whenever text gets added to it.
Is this doable?
I think this should work: every time the text is modified, this should be called:
def modified(self, event):
self.txt.see(END) # tkinter.END if you use namespaces
To catch the modification, use:
self.txt.bind('<<Modified>>', self.modified)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With