I have a text widget with a scroll list that looks something like this:
self.myWidget = Text(root) self.myWidget.configure(state=DISABLED) self.myWidget.pack() self.myWidgetScrollbar = Scrollbar(root, command=self.myWidget.yview) self.myWidget.configure(yscrollcommand=self.myWidgetScrollbar.set) self.myWidgetScrollbar.pack(side=LEFT,fill=Y)
The text widget is updated 4 times per second:
self.myWidget.configure(state=NORMAL) self.myWidget.delete(1.0, END) self.myWidget.insert(END, "\n".join(self.listWithStuff)) self.myWidget.configure(state=DISABLED)
The problem is that when I try to scroll, it continues to scroll me up (maybe 4 times per second). I assume this is due to the fact that all content is deleted.
How can I prevent it from automatically scrolling, or perhaps backward when content is changed?
source share