title: Tkinter - Get Entry text on double click (for loop)
body: <p>I'm making a program which gets database records with the PyMySQL module and then I want to display those records in Tkinter Entries. I already have the code to do that, but I want to add a functionality.</p>
  
  <p>I want to give the user the functionality to <strong>doubleclick</strong> on an Entry of a row and get all Entry text of that row and parse them into the textboxes I declared before the For loop (UserID, First_Name etc).
  Say I have 5 Entries per row. If the user <strong>doubleclicks</strong> on (for example) Entry number 2 of Row 1, I want to get the text from all Entries in Row 1 and parse them into the textboxes respectively.</p>
  
  <p>This is the code I currently have:</p>
  
  <pre><code>window = tk.Tk()
  window.title("Flexbase") #Give window a name
  window.update_idletasks()
  width = 640
  height = 480
  x = (window.winfo_screenwidth() // 2) - (width // 2)
  y = (window.winfo_screenheight() // 2) - (height // 2)
  window.geometry('+{}+{}'.format(x, y))
  
  GetRows_StringVariable = "SELECT * FROM SEC_USER"
  cursor.execute(GetRows_StringVariable)
  results = cursor.fetchall()
  
  RowCounter = 1
  ColumnCounter = -1
  ListCounter = 0
  RowListCounter = 0
  
  rows = []
  
  id_list = []
  firstname_list = []
  surname_list = []
  username_list = []
  email_list = []
  password_list = []
  
  tk.Label(window, text="Testing").grid(row=0, column=0, sticky=NSEW)
  UserID_TextBox = tk.Entry(window, width=20, bg="white") #Create text box
  UserID_TextBox.grid(row=1, column=0, sticky=W) #Give the text box a position in the window
  FirstName_TextBox = tk.Entry(window, width=60, bg="white")
  FirstName_TextBox.grid(row=2, column=0, sticky=W)
  Surname_TextBox = tk.Entry(window, width=60, bg="white")
  Surname_TextBox.grid(row=3, column=0, sticky=W)
  Email_TextBox = tk.Entry(window, width=60, bg="white")
  Email_TextBox.grid(row=4, column=0, sticky=W)
  Username_TextBox = tk.Entry(window, width=20, bg="white")
  Username_TextBox.grid(row=5, column=0, sticky=W)
  Password_TextBox = tk.Entry(window, show="*", width=20, bg="white")
  Password_TextBox.grid(row=6, column=0, sticky=W)
  
  notebook = ttk.Notebook(window)
  notebook.grid(row=7, column=0, sticky=NSEW)
  
  page1 = ttk.Frame(notebook)
  notebook.add(page1, text="Mass Editing Mode")
  tk.Label(page1, text=SQL_ID, fg="black", font="Arial 8 bold").grid(row=0, column=0, sticky=W)
  tk.Label(page1, text=SQL_FIRSTNAME, fg="black", font="Arial 8 bold").grid(row=0, column=1, sticky=W)
  tk.Label(page1, text=SQL_SURNAME, fg="black", font="Arial 8 bold").grid(row=0, column=2, sticky=W)
  tk.Label(page1, text=SQL_USERNAME, fg="black", font="Arial 8 bold").grid(row=0, column=3, sticky=W)
  tk.Label(page1, text=SQL_EMAIL, fg="black", font="Arial 8 bold").grid(row=0, column=4, sticky=W)
  
  
  for row in results: # Page 1 TAB
      ColumnCounter += 1
      id_list.append(row[SQL_ID])
      a = tk.Entry(page1, fg="black", font="Arial 8 bold")
      a.grid(row=RowCounter, column=ColumnCounter, sticky=W)
      a.insert(0, row[SQL_ID])
      ColumnCounter += 1
      firstname_list.append(row[SQL_FIRSTNAME])
      b = tk.Entry(page1, fg="black", font="Arial 8 bold")
      b.grid(row=RowCounter,column=ColumnCounter,sticky=W)
      b.insert(0, row[SQL_FIRSTNAME])
      ColumnCounter += 1
      surname_list.append(row[SQL_SURNAME])
      c = tk.Entry(page1, fg="black", font="Arial 8 bold")
      c.grid(row=RowCounter,column=ColumnCounter,sticky=W)
      c.insert(0, row[SQL_SURNAME])
      ColumnCounter += 1
      username_list.append(row[SQL_USERNAME])
      d = tk.Entry(page1, fg="black", font="Arial 8 bold")
      d.grid(row=RowCounter, column=ColumnCounter, sticky=W)
      d.insert(0, row[SQL_USERNAME])
      ColumnCounter += 1
      email_list.append(row[SQL_EMAIL])
      e = tk.Entry(page1, fg="black", font="Arial 8 bold")
      e.grid(row=RowCounter, column=ColumnCounter, sticky=W)
      e.insert(0, row[SQL_EMAIL])
  
      RowCounter += 1
      ColumnCounter = -1
      ListCounter += 1
      RowListCounter += 1
  </code></pre>
  
  <p>This code produces a window with 5 Entries per row.</p>