title: Tkinter Scrollbar inactive untill the window is manually resized
body: <p>The scrollbar activates only when the window is rezised, despite reconfiguring the scrollregion everytime a widget(Button in this case) is added.</p>
  <pre><code>class Editor:
  
      
      def __init__(self,master):
           
          self.master = master
          self.master.resizable(True,False)
          
          self.edit_frame = tk.Frame(self.master)
          self.edit_frame.pack(fill=&quot;none&quot;) 
          self.elem_frame = tk.Frame(self.master,width=700)
          self.elem_frame.pack(fill=&quot;y&quot;, expand=1)
  
          self.my_canvas = tk.Canvas(self.elem_frame, width = 700)
          self.my_canvas.pack(side = &quot;left&quot;, fill=&quot;both&quot;, expand=1)
  
          my_scrollbar = ttk.Scrollbar(self.elem_frame, orient = &quot;vertical&quot;, command =self.my_canvas.yview)
          my_scrollbar.pack(side = &quot;right&quot;,fill=&quot;y&quot;)
  
          self.my_canvas.configure(yscrollcommand=my_scrollbar.set)
  
          self.my_canvas.bind('&lt;Configure&gt;', self.movescroll )
  
  
          self.second_frame = tk.Frame(self.my_canvas, bg = &quot;black&quot;, width=700)
  
          self.my_canvas.create_window((0,0), window=self.second_frame, anchor=&quot;nw&quot;)
  
                          
          self.naz = Nazioni()
          paesi = [*self.naz.iso3]
          print(paesi)
          self.comb_paese = ttk.Combobox(self.edit_frame, value = paesi)
          self.comb_paese.current(1)
          
          
          self.kwordvar= tk.StringVar()
          entry_keyword = tk.Entry(self.edit_frame, textvariable=self.kwordvar)
          entry_keyword.bind(&quot;&lt;FocusOut&gt;&quot;, self.callback)
           
          
          writer = tk.Text(self.edit_frame)
          
          
          self.edit_frame.pack(side=&quot;left&quot;) 
          writer.pack()
          self.comb_paese.pack()
          entry_keyword.pack() 
                    
  
      def callback(self, *args):
           kword = self.kwordvar.get()
           self.colonnarisultati(kword) 
    
      def colonnarisultati(self, keyword):
         
          
         #TROVA IL VALORE CODICE ISO A 3CHAR IN BASE ALLA NAZIONE NEL COMBOBOX
         p = self.comb_paese.get()
         paese = self.naz.iso3[p]
         ricerca = Ricerca(paese, keyword)
         &quot;&quot;&quot; 
         for label in self.elem_frame.winfo_children():
              label.destroy()
         &quot;&quot;&quot;
         self.count = 0
         print(&quot;ciao&quot;)
         for x in ricerca.listaricerca:
              
             tit = str(x['titolo']).lstrip(&quot;&lt;h4&gt;&quot;).rstrip(&quot;&lt;/h4&gt;&quot;)
             print(tit) 
             self.elementotrovato(tit,self.count)
             self.count +=1 
         self.my_canvas.configure(scrollregion=self.my_canvas.bbox(&quot;all&quot;))
      
                  
         
      def movescroll(self, *args):
          self.my_canvas.configure(scrollregion=self.my_canvas.bbox(&quot;all&quot;))
             
  
  
  
      def elementotrovato(self, testobottone, conta):
  
            Bott_ecoifound = tk.Button(self.second_frame, text = testobottone,width = 100 ,height = 30, font = (&quot;Helvetica&quot;, 12, &quot;bold&quot;), wraplength=200, justify=&quot;left&quot;)
            print(&quot;CIAONE&quot;)
            
            Bott_ecoifound.pack(fill=&quot;both&quot;, expand=1)
            self.my_canvas.configure(scrollregion=self.my_canvas.bbox(&quot;all&quot;))
  </code></pre>
  <p>The last method is the one adding button to the scrollable frame.
  After the window is manually resized, no matter if back to its original size, the scrollbar activates and works fine.</p>