title: How to delete entire row in Tkinter grid layout
body: <p>I am trying a test application with Tkinter. I have created a table using grid layout manager as shown below. There are two buttons - <em>Add row</em> and <em>Delete row</em>. <em>Add row</em> works as expected. How i can go about deleting selected rows. My idea was to give a Checkbutton for each row as shown below. And every selected row can be deleted. But  i don't know how to do it exactly and if its possible. </p>
  
  <p>Is there a better way to delete the rows in this case ? please suggest a solution. </p>
  
  <p><a href="https://i.stack.imgur.com/HLvek.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HLvek.png" alt="enter image description here"></a></p>
  
  <p>CODE: </p>
  
  <pre><code>        from Tkinter import *
          import ttk
          from ttk import * 
  
          i =2
  
          def add_row():
              global i 
              var = IntVar()
              c = Checkbutton(root, variable = var)
              c.grid(row = i, column = 0)
              for j in range(1,5): #Columns
  
                      b = Entry(root)
                      b.grid(row=i, column=j)
              i =i+1 
  
          root = Tk()
          bt = ttk.Button(root , text = 'Add Row', command = add_row)
          bt.grid(row =0, column=0)
  
  
          dl = ttk.Button(root , text = 'Delete Row')
          dl.grid(row =0, column=1)
  
          v0 = StringVar()
          e0 = Entry(root, textvariable = v0, state = 'readonly')
          v0.set('Select')
          e0.grid(row = 1, column = 0 )
  
          v1 = StringVar()
          e1 = Entry(root, textvariable = v1, state = 'readonly')
          v1.set('Col1')
          e1.grid(row = 1, column = 1 )
  
          v2 = StringVar()
          e2 = Entry(root, textvariable = v2, state = 'readonly')
          v2.set('Col2')
          e2.grid(row = 1, column = 2)
  
          v3 = StringVar()
          e3 = Entry(root, textvariable = v3, state = 'readonly')
          v3.set('Col3')
          e3.grid(row = 1, column = 3 )
  
          v4 = StringVar()
          e4 = Entry(root, textvariable = v4, state = 'readonly')
          v4.set('Col4')
          e4.grid(row = 1, column = 4 )
  
          mainloop()
  </code></pre>
  
  <p>Note:  I do not want to use tktable or treeview to create tables. </p>