title: tkinter put scrollbar on canvas at bottom position
body: <p>Question on scrollbar positions on my tkinter canvas. I have a frame with 3 canvas widgets. Courtesy <a href="https://stackoverflow.com/questions/21429014/tkinter-add-scrollbar-for-each-labelframe">to this post</a> for the idea. I added a horizontal scrollbar and each canvas has a 50+ column 500+ row pandas dataframe. The load is not very fast but that isn't an objective.</p>
  
  <p>New rows will be added to the bottom of each dataframe. This new row needs a validation. So instead of scrolling down every time, it would be great if the scrollbar / or canvas shows the bottom part.</p>
  
  <p>See below the code where the 3x canvas and 3x scrollbars (x+y) are defined.</p>
  
  <pre><code>def createBox(window):
      list_ = ['df1', 'df2', 'df3'] # 3 dataframes
  
      for i in range(3):
              mybox = LabelFrame(window, padx=5, pady=4)
              mybox.grid(row=i, column=0)
              createWindow(mybox, list_[i], i)
  
  def createWindow(box, lt_actual, i):
      canvas = Canvas(box, borderwidth=0)
      frame = Frame(canvas)
              vsbY = Scrollbar(box, orient="vertical", command=canvas.yview)
              canvas.configure(yscrollcommand=vsbY.set, width=1200, heigh=200) 
              vsbY.pack(side="right", fill="y")
  
              vsbX = Scrollbar(box, orient="horizontal", command=canvas.xview)
              canvas.configure(xscrollcommand=vsbX.set, width=1200, heigh=200)       
              vsbX.pack(side="bottom", fill="x")
  
      #canvas.yview_moveto(1) - no effect
      #canvas.yview_moveto(1.0) - no effect
  
      canvas.pack(side="left", fill="both", expand=True)
      canvas.create_window((4,4), window=frame, anchor="nw", tags="frame")
  
      # be sure that we call OnFrameConfigure on the right canvas
      frame.bind("&lt;Configure&gt;", lambda event, canvas=canvas: OnFrameConfigure(canvas))
  </code></pre>
  
  <p>I read on this forum and on some <a href="http://effbot.org/tkinterbook/scrollbar.htm" rel="nofollow noreferrer">info (effbot) pages</a> that i should use the moveto() / yview_moveto() command option but so far this doesn't seem to work.</p>
  
  <p>Question 1. Should I put the y-scrollbar to the bottom or should i put the canvas view to the bottom.</p>
  
  <p>Question 2. Can you provide some guidance on how to use the moveto or should I follow a different approach?</p>
  
  <p>Thanks so much!</p>
  
  <blockquote>
    <p></p>
  </blockquote>