[issue5163] tkinter.scrolledtext: new text is hidden after using insert()

Guilherme Polo report at bugs.python.org
Fri Feb 20 20:36:35 CET 2009


Guilherme Polo <ggpolo at gmail.com> added the comment:

Do you mean something like this:

import Tkinter

def insert():
    text.insert('end', 'buh\n')
    text.see('end')
    text.after(100, insert)

text = Tkinter.Text()
text.pack(expand=True, fill='both', side='left')
vbar = Tkinter.Scrollbar(orient='vertical', command=text.yview)
vbar.pack(side='right', fill='y')
text.configure(yscrollcommand=vbar.set)
text.after(100, insert)

text.mainloop()

(or change Tkinter by tkinter to work on python 3.x)
Text.see already does what you want, can you argue why adding an option
for that would be good ?

----------
nosy: +gpolo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5163>
_______________________________________


More information about the Python-bugs-list mailing list