title: More Issues with overlapping labels in Tkinter
body: <p>I am  having a problem with Tkinter.  The issue is as follows. </p>
  
  <p>I retrieve information from a Database. I wish to print that out based off a few user selections.
  Sometimes I want to print out columns A, B, C
  Sometimes I want to print out columns, A, B, C, D
  Sometimes I want to print out columns A, B, D, E</p>
  
  <p>Also, when I query, I do not know ahead of time how many results I will have. Some queries give 1.  Some give 200.  To print them, I do something like this...</p>
  
  <pre><code>            while x &lt; results.num_rows() :
                  result = results.fetch_row()
                  author = result[0][0]
                  title = result[0][1]
                  conference = result[0][2]
                  year = result[0][3]
                  location = result[0][4]
                  Label(root, text=title).grid(row=startRow,column=0,columnspan=5,sticky=W)
                  Label(root,text=author).grid(row=startRow,column=6,columnspan=1,sticky=W)
                  Label(root,text=year).grid(row=startRow,column=7,columnspan=1,sticky=W)
                  Label(root,text=conference).grid(row=startRow,column=8,columnspan=1,sticky=W)
                  Label(root,text=location).grid(row=startRow,column=9,columnspan=1,sticky=W)
                  startRow+=1
                  x+=1
  </code></pre>
  
  <p>This accomplishes what I want. I get a label printed below the previous for each item. It prints the desired columns (in this case, title, author, year, conference, location).  Sometimes its different. It's all good.</p>
  
  <p>Until my user does another query.  I can't delete the previous labels. I have no reference to them. I can't make a reference to them, because I dont know ahead of time how many I will need.  The number of labels is based off of the query the user wants and obviously the matching entries in the database.</p>
  
  <p>So when the user does the 2nd or 3rd query, results start to get printed on top of one another.</p>
  
  <p>What can I do?</p>
  
  <p>EDIT - This was the attempt.  I added in </p>
  
  <pre><code>    try :
          for item in labelList :
              item.grid_forget()
      except :
          pass
  </code></pre>
  
  <p>I put that at the beginning of my button code, so that if the labelList already exists,  it will do this at each query.  If it doesn't exist, it will just pass.</p>
  
  <pre><code>            while x &lt; results.num_rows() :
                  result = results.fetch_row()
                  title = result[0][0]
                  conference = result[0][1]
                  year = result[0][2]
                  location = result[0][3]
                  message = title + "\t\t\t\t\t" + conference + "\t" + str(year) + "\t" + location
                  label = Label(root, text=title)
                  label.grid(row=startRow, column=0, columnspan=5,sticky=W)
                  labelList.append(label)
                  label = Label(root, text=conference)
                  label.grid(row=startRow, column=6, columnspan=1,sticky=W)
                  labelList.append( label )
                  label = Label(root, text=year)
                  label.grid(row=startRow, column=7, columnspan=1,sticky=W)
                  labelList.append( label )
                  label = Label(root, text=location)
                  label.grid(row=startRow, column=8, columnspan=1,sticky=W)
                  labelList.append( label )
                  startRow+=1
                  x+=1
  </code></pre>
  
  <p>However I am still getting the overlapping issue.</p>