title: Adding a scrollbar to a Tkinter canvas object
body: <p>After looking for some assistance for help to adding a scroll bar to a canvas frame I seem to have cobbled something together. This however, doesn't seem to "join" the output I packed to the canvas with the scrollbar. A scrollbar appears but it is "full" so doesn't scroll and isn't actually connected/joined with the displayed output.</p>
  
  <pre><code>root = Tkinter.Tk()
  
  sizex = 1050
  sizey = 800
  posx = 100
  posy = 100
  root.wm_geometry("%dx%d+%d+%d" % (sizex, sizey, posx, posy))
  
  myframe = Frame(root, relief=GROOVE, width=50, height=100, bd=1)
  myframe.place(x=10,y=10)
  
  canvas=Canvas(myframe)
  frame=Frame(canvas)
  myscrollbar = Scrollbar(myframe, orient="vertical", command=canvas.yview)
  canvas.configure(yscrollcommand=myscrollbar.set)
  
  myscrollbar.pack(side="right", fill="y")
  canvas.pack(side="left")
  canvas.create_window((0,0), window=frame, anchor='nw')
  
  def myfunction(event):
   canvas.configure(scrollregion=canvas.bbox("all"),width=sizex,height=sizey)
  
  frame.bind("&lt;Configure&gt;", myfunction)
  
  data = information.read()
  
  L1 = Label(root, text = 'A Title')
  L1.pack(side=TOP)
  
  text = Text(root)
  text.insert(INSERT, data)
  text.pack()
  </code></pre>