title: Add labels to the top of a tkinter grid?
body: <p>The point of this is to press a button and have new rows appear but currently, titles appear above each new row that is added. Instead, I would like to have one row at the top of the grid with column titles. Is there a way to modify this code I already have? Later, I will be incorporating this into a larger tkinter GUI. </p>
  
  <pre><code>from tkinter import *
  
  #------------------------------------
  
  def addbox():
      frame =Frame(root)
      frame.pack()
  
      #Item  
      Label(frame, text="Item").grid(row=0, column=0)
  
      ent1 = Entry(frame, width=10)
      ent1.grid(row=2, column=0)
  
      #Day
      Label(frame, text="Day").grid(row=0, column=1)
      ent2 = Entry(frame, width=10)
      ent2.grid(row=2, column=1)
  
      #Code
      ent3 = Entry(frame, width=10)
      ent3.grid(row=2, column=2)
  
      #Factor
      ent4 = Entry(frame, width=10)
      ent4.grid(row=2, column=3)
  
      all_entries.append( (ent1, ent2, ent3, ent4) )
  
  
      #Buttons. 
      showButton = Button(frame, text='Print', command=refresh)
      addboxButton = Button(frame, text='Add Item', fg="Red", command=addbox)
  
  
  
  #------------------------------------
  
  def refresh():
  
      for number, (ent1, ent2, ent3, ent4) in enumerate(all_entries):
          print (number, ent1.get(), ent2.get(), ent3.get(),ent4.get())
  
  #------------------------------------
  
  all_entries = []
  
  root = Tk()
  
  addboxButton = Button(root, text='Add Instrument', fg="Red", command=addbox)
  addboxButton.pack()
  
  root.mainloop()
  </code></pre>