[Tutor] How to force Tkinter scrollbar to move with the cursor without mouse/keyboard?

Hy Python pythonpython@hotmail.com
Thu Jan 9 01:54:03 2003


Could someone please tell me:
How to force Tkinter scrollbar to move with the cursor without 
mouse/keyboard?

I mean,  when I execute something like:
    textObject.mark_set(END, END)
the cursor automatically goes to the end of the textObject in the GUI 
window, but the scrollbar does NOT move at all. How can I force the 
scrollbar to move to the end in the GUI window with the cursor?

Thanks a lot for your help!


Hy
P.S.

The ScolledText class I am using:


class ScrolledText(Frame):
	def __init__(self,parent=None,text=""):
		Frame.__init__(self, parent)
		self.pack(expand=YES, fill=BOTH)
		self.makeWidgets()
		self.setText(text)
	def makeWidgets(self):
		sbar=Scrollbar(self)
		text=Text(self, relief=SUNKEN, width=60, height=15)
		sbar.config(command=text.yview)
		text.config(yscrollcommand=sbar.set)
		sbar.pack(side=RIGHT, fill=Y)
		text.pack(side=LEFT, expand=YES, fill=BOTH)
		self.text=text
	def setText(self,text):
		self.text.delete('1.0', END)
		self.text.insert('1.0', text)
		self.text.mark_set(INSERT, END)


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail