Tkinter text widget

goldtech goldtech at worldpost.com
Mon Oct 8 10:57:46 EDT 2007


After some Google searching I found "ScrolledText", this does what I
want :^)


from Tkinter import *
from ScrolledText import ScrolledText
root = Tk()
text = ScrolledText(root, font=("Courier"))
ScrolledText
text.pack()
i='123456789abcdefghijklmnopqrstuvwxyz\n'
for x in range(30):
    text.insert(END, "%3d " % x + i)
text.config(state=DISABLED)
mainloop()




More information about the Python-list mailing list