title: Tkinter Scrollbars with labels, canvas and frames
body: <p>I wanted to make a page where I have on the right some labels and on the left some other labels with their respective scrollbar. But I didn't managed to do it.</p>
  <pre><code>from tkinter import *
  
  root = Tk()
  
  root.columnconfigure(0, weight=1)
  root.columnconfigure(2, weight=1)
  
  canvasL = Canvas(root, bg='blue')
  canvasL.grid(row=0, column=0, sticky=&quot;news&quot;)
  
  canvasR = Canvas(root, bg='blue')
  canvasR.grid(row=0, column=2, sticky=&quot;news&quot;)
  
  frameL = Frame(canvasL, bg='red', width=1000)
  frameL.grid(row=0, column=0, sticky=&quot;news&quot;)
  
  frameR = Frame(canvasR, bg='red')
  frameR.grid(row=0, column=0, sticky=&quot;news&quot;)
  
  frameL.grid_propagate(False)
  frameR.grid_propagate(False)
  
  S1 = Scrollbar(frameL, orient=&quot;vertical&quot;, command=canvasL.yview)
  S1.grid(row=0, column=1, sticky=&quot;news&quot;)
  
  S2 = Scrollbar(frameR, orient=&quot;vertical&quot;, command=canvasR.yview)
  S2.grid(row=0, column=3, sticky=&quot;news&quot;)
  
  canvasL.configure(yscrollcommand=S1.set)
  canvasL.configure(scrollregion=canvasL.bbox(&quot;all&quot;))
  
  canvasR.configure(yscrollcommand=S2.set)
  canvasR.configure(scrollregion=canvasR.bbox(&quot;all&quot;))
  
  canvasL.create_window((0, 0), anchor='nw', window=frameL)
  canvasR.create_window((0, 0), anchor='nw', window=frameR)
  
  for i in range(0, 40):
      labelName = Label(frameL, text=&quot;Name : &quot; + str(i), bg='#F5F5F5')
      labelName.grid(row=i, column=0)
      labelName = Label(frameR, text=&quot;Name : &quot; + str(i), bg='#F5F5F5')
      labelName.grid(row=i, column=2)
  
  root.mainloop()
  
  </code></pre>
  <p>If you test this code you will see that there is a problem. Can you help me please ?
  Thank you in advance.</p>