From: Chris Hare on
Here is my chunk of code. I can't figure out what I am doing wrong to put my scrollbar on the right hand side of the text box.

from Tkinter import *

def showLogFile():
top = Toplevel()
f = Frame(top, bd=0, bg="Gray")
top.title = "netcomm log file"
f.grid()
sc = Scrollbar(top)
sc.grid()
t = Text(f, yscrollcommand = sc.set)
sc.config(command=t.yview)
t.insert(END,"This is a line of text")
t.config(height=20,width=80,bg="Gray")
button = Button(f, text="Dismiss", command=top.destroy, highlightbackground="Red")
t.grid()
button.grid()


showLogFile()
mainloop()