So I have this simple list and scroll bar combo and I have been trying to make it stay at the bottom of the scroll bar as the text is added so it looks like the scroll bar is just to look back over the previous text.

Like in a text-based game style thing?

Here is la code:

from Tkinter import *

root = Tk()
displayscrollbar = Scrollbar(root)
scrollbar.pack( side = RIGHT, fill=Y )

display = Listbox(root, yscrollcommand = scrollbar.set )
for line in range(100):
   display.insert(END, "This is line number " + str(line))
display.pack( side = LEFT, fill = BOTH )
scrollbar.config( command = display.yview )

mainloop()

Add this line display.see(display.size()) after scrollbar.config( command = display.yview )

Sorry, Is there any chance you might know how to do it with a Text widget?

use: Text.see(Text.END) in the same place as last time

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.