Re: ScrolledText widgets

Guido.van.Rossum@cwi.nl
Wed, 04 Jan 1995 10:54:15 +0100

> I have a ScrolledText widget W on my screen. I read a line of input
> from a process P and write this line to W by doing,
>
> W.insert('end', my_new_line)
>
> Now when I have output H lines of output (where H is the height of W)
> I would like W to automatically scroll each time I add a new line to
> it, so that W always displays the *last* H lines of output. I have tried
> experimenting with yview and yscrollcommand to achieve this effect but
> to no avail. Does anyone have any suggestions?

What works for me is to use

W.yview_pickplace('end')

--Guido van Rossum, CWI, Amsterdam <mailto:Guido.van.Rossum@cwi.nl>
<http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>