title: Python, Tkinter: Scrollbar on canvas with entry widgets
body: <p>EDIT: Sorry, I should've searched more before I asked, because I've found a solution to my problem now. Link: <a href="https://stackoverflow.com/questions/3085696/adding-a-scrollbar-to-a-grid-of-widgets-in-tkinter">Adding a scrollbar to a group of widgets in Tkinter</a></p>
  
  <p>I'm trying to add a canvas to a Tkinter GUI, where entry widgets with text from a file is added to a grid. The amount of text in the file tends to be a big, so I need to add a scrollbar. </p>
  
  <p>The entry widgets is added to the canvas the way they're supposed to, and I've independently tested the scrollbar, and it works fine - except when the entry widgets are added. When I do that, the scrollbar disappears.</p>
  
  <p>Here is the code for the canvas and scrollbar:</p>
  
  <pre><code>    groupfr = Frame(self.labelll, width = 200, height = 1000)
      groupfr.pack_propagate(0)
      groupfr.pack(fill='both', side='left')
  
      canvasgroup = Pmw.Group(groupfr, tag_text= 'canvasgroup')   
      canvasgroup.pack(fill = 'both', expand = 1, padx = 1, pady = 1)
  
      self.canvas = Tkinter.Canvas(canvasgroup.interior(), width = 200,
                                   height = 1000, bg = 'white')
  
      self.canvas.config(scrollregion=(0,0,20,1000))
      self.sbar = Tkinter.Scrollbar(self.canvas)
      self.sbar.config(command=self.canvas.yview)
  
      self.canvas.config(yscrollcommand=self.sbar.set)
  
      self.sbar.pack(side='right', fill='y')
  
      self.canvas.pack_propagate(0)
      self.canvas.pack(side = 'left', fill = 'y', expand = 'no')
  </code></pre>
  
  <p>My apologies for the terrible code. This, however, is where the real problems begin:</p>
  
  <pre><code>for items in linematch:
      items = items.split('=')
      list_of_lists.append(items)
  
      columncount = 0
      rowcount = 0
  
      for items in list_of_lists:
          rowcount = rowcount + 1
          columncount = 0
  
          for idx, (words) in enumerate(zip(items)):
              self.canvas.pack_propagate(0)
              colcnt = colcnt + 1
              idx = Tkinter.Entry(self.canvas)
              idx.grid(row=rowcount, column=columncount)
              idx.insert(0, words)
  </code></pre>
  
  <p>The code takes the file input and makes each line into a list of two items, which is itself appended to another list. This list of lists is used put into entry widgets like this, with each word (and translation) in their own entry widget:</p>
  
  <pre><code>word translation
  word translation
  </code></pre>
  
  <p>etc. (Don't know how important this info is.)</p>
  
  <p>Does anyone get why the scrollbar disappears when the entry widgets is added?</p>
  
  <p>Thanks</p>