title: Python tkinter scrollbar issue after GUI is idle
body: <p>I am having scrollbar issues with tkinter.  I believe the issue to be a widget creation problem.  I have no issues with scrollbars that build as the GUI is generating (as you can see from my code that would normally work in a case such as that).  I believe my issue is that the GUI builds and goes idle.  I have a canvas with a frame embedded, then labels go in that frame.  What happens is the scrollbar scrolls the whole frame, not the labels in the frame.  Minimal reproducible example:</p>
  <pre><code>import tkinter as tk
  
  
  class MainGUI(tk.Tk):
      def __init__(self):
          tk.Tk.__init__(self)
          self.main_frm = tk.Frame(self, bd=3, relief='ridge')
          self.main_frm.grid()
          self.bttn1 = tk.Button(self.main_frm, command=self.button1, text='F1')
          self.bttn1.grid(column=0, row=2)
          self.bttn2 = tk.Button(self.main_frm, command=self.button2,  text='F2')
          self.bttn2.grid(column=1, row=2)
          self.frm1 = tk.Frame(self.main_frm, bd=2, relief='ridge')
          self.frm1.grid(column=0, row=1)
          self.frm2 = tk.Frame(self.main_frm, bd=2, relief='ridge')
          self.frm2.grid(column=1, row=1)
          self.cnv1 = tk.Canvas(self.frm1, height=400, width=400)
          self.cnv1.grid(row=1)
          self.cnv1.bind('&lt;Enter&gt;', self.bind_mouse)
          self.cnv1.bind('&lt;Leave&gt;', self.unbind_mouse)
          self.cfm1 = tk.Frame(self.cnv1)
          id01 = self.cnv1.create_window((0, 0), anchor='nw', window=self.cfm1)
          self.cnv1.bind('&lt;Configure&gt;', self.configure_frame)
          sc01 = tk.Scrollbar(self.frm1, orient='vertical', command=self.cnv1.yview)
          sc01.grid(column=1, row=1, sticky='ns')
          self.cnv1.config(yscrollcommand=sc01.set)
          self.cnv2 = tk.Canvas(self.frm2, height=400, width=400)
          self.cnv2.grid(row=1)
          self.cnv2.bind('&lt;Enter&gt;', self.bind_mouse)
          self.cnv2.bind('&lt;Leave&gt;', self.unbind_mouse)
          self.cfm2 = tk.Frame(self.cnv2)
          id02 = self.cnv2.create_window((0, 0), anchor='nw', window=self.cfm2)
          self.cnv2.bind('&lt;Configure&gt;', self.configure_frame)
          sc02 = tk.Scrollbar(self.frm2, orient='vertical', command=self.cnv2.yview)
          sc02.grid(column=1, row=1, sticky='ns')
          self.cnv2.config(yscrollcommand=sc02.set)
  
      def button1(self):
          for e in range(50):
              lab = tk.Label(self.cfm1, text='TEST', width=50)
              lab.grid(row=e)
  
      def button2(self):
          for e in range(50):
              lab = tk.Label(self.cfm2, text='TEST', width=50)
              lab.grid(row=e)
  
      def bind_mouse(self, event):
          if event.widget == self.cnv1:
              self.cnv1.bind_all('&lt;4&gt;', self.do_mouse_wheel)
              self.cnv1.bind_all('&lt;5&gt;', self.do_mouse_wheel)
              self.cnv1.bind_all('&lt;MouseWheel&gt;', self.do_mouse_wheel)
          elif event.widget == self.cnv2:
              self.cnv2.bind_all('&lt;4&gt;', self.do_mouse_wheel)
              self.cnv2.bind_all('&lt;5&gt;', self.do_mouse_wheel)
              self.cnv2.bind_all('&lt;MouseWheel&gt;', self.do_mouse_wheel)
  
      def unbind_mouse(self, event):
          if event.widget == self.cnv1:
              self.cnv1.unbind_all('&lt;4&gt;')
              self.cnv1.unbind_all('&lt;5&gt;')
              self.cnv1.unbind_all('&lt;MouseWheel&gt;')
          elif event.widget == self.cnv2:
              self.cnv2.unbind_all('&lt;4&gt;')
              self.cnv2.unbind_all('&lt;5&gt;')
              self.cnv2.unbind_all('&lt;MouseWheel&gt;')
  
      def do_mouse_wheel(self, event):
          parent = event.widget.winfo_parent()
          widg = self.nametowidget(parent)
          if widg == self.cfm1:
              if event.num == 4:
                  self.cnv1.yview_scroll(-1, 'units')
              elif event.num == 5:
                  self.cnv1.yview_scroll(1, 'units')
          elif widg == self.cfm2:
              if event.num == 4:
                  self.cnv2.yview_scroll(-1, 'units')
              elif event.num == 5:
                  self.cnv2.yview_scroll(1, 'units')
  
      def configure_frame(self, event):
          if event.widget == self.cnv1:
              self.cnv1.config(scrollregion=self.cnv1.bbox('all'))
          elif event.widget == self.cnv2:
              self.cnv2.config(scrollregion=self.cnv2.bbox('all'))
  
  
  main_gui = MainGUI()
  main_gui.mainloop()
  </code></pre>
  <p>I have tried a dozen adjustments, with no success.  I can't recall everything I've tried based on my understanding of tkinter and scrollbars, but hopefully someone can spot the issue and it can be resolved.  Thanks.</p>