scrollbar

Raseliarison nirinA nirina at mail.blueline.mg
Thu Apr 17 06:53:31 EDT 2003


"zyziu" wrote:

> Hello. I made lanChat in Python. I have problem with Text widget. I want
to
> text from Entry goes to Text widget and scrollbar goes down, because I
can't
> see what write another user. Now I must do it manually. How do it to
> scrollbar goes down automatically? Thanks for answer. Zyziu from Poland.

Maybe you want Text widget see method.
Also, you can try using ScrolledText instead of Scrollbar

# ----begin------
from ScrolledText import *
root = Tk()
st = ScrolledText(root)
st.pack()
st.insert('insert','hello\n')

for i in range(200):
    st.insert('insert',str(i)+'\n')
st.insert('insert','This is the end')

# the see method
st.see('end')
st.pack()
Button(root,text='quit',command=root.quit).pack()
root.mainloop()
# ----end--------

Hope this helps
nirinA








More information about the Python-list mailing list