title: Python Tkinter - Put Vertical and Horizontal Scrollbar at the edge of the canvas
body: <p>I want to put the horizontal and vertical scrollbars at the edge of the yellow canvas using Python tkinter, but whatever I do, it does not move and just stay inside the perimeter of the canvas. Why? Below is the image:</p>
  
  <p><a href="https://i.stack.imgur.com/4iMnc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4iMnc.png" alt="enter image description here"></a></p>
  
  <p>Below is the code:</p>
  
  <pre><code> def render_gui(self):
  
      self.main_window = tk.Tk()
      self.main_window.geometry("1000x600")
      self.main_window.title("Damaged Text Document Virtual Restoration")
      self.main_window.resizable(True, True) 
      self.main_window.configure(background="#d9d9d9")
      self.main_window.configure(highlightbackground="#d9d9d9")
      self.main_window.configure(highlightcolor="black")
  
  
      self.main_canvas = tk.Canvas(self.main_window, bg = "yellow")
      self.main_canvas.pack(expand = True, fill = "both")
  
      vsb = tk.Scrollbar(self.main_canvas, orient="vertical", command=self.main_canvas.yview)
      hsb = tk.Scrollbar(self.main_canvas, orient="horizontal", command=self.main_canvas.xview)
      vsb.grid(row=1, column=50,columnspan = 20, sticky='ns')
      hsb.grid(row=20, column=1,rowspan = 20,sticky = 'wes')
  
      self.main_canvas.configure(yscrollcommand=vsb.set,xscrollcommand=hsb.set)
      self.main_window.mainloop()
  </code></pre>
  
  <p>Please help.</p>