#==================================FRAME==============================================
Top = Frame(root, width=900, height=50, bd=8, relief="raise")
Top.pack(side=TOP)
Left = Frame(root, width=600, height=500, bd=8, relief="raise")
Left.pack(side=LEFT)
Right = Frame(root, width=300, height=500, bd=8, relief="raise")
Right.pack(side=RIGHT)
Forms = Frame(Right, width=300, height=450)
Forms.pack(side=TOP)
Buttons = Frame(Right, width=300, height=100, bd=8, relief="raise")
Buttons.pack(side=BOTTOM)
RadioGroup = Frame(Forms)
#==================================LABEL WIDGET=======================================
txt_title = Label(Top, width=900, font=('arial', 24), text = "Populate Entry Text On Double Click")
txt_title.pack()
txt_firstname = Label(Forms, text="Firstname:", font=('arial', 16), bd=15)
txt_firstname.grid(row=0, stick="e")
txt_lastname = Label(Forms, text="Lastname:", font=('arial', 16), bd=15)
txt_lastname.grid(row=1, stick="e")
txt_address = Label(Forms, text="Address:", font=('arial', 16), bd=15)
txt_address.grid(row=2, stick="e")
txt_username = Label(Forms, text="Username:", font=('arial', 16), bd=15)
txt_username.grid(row=3, stick="e")
txt_password = Label(Forms, text="Password:", font=('arial', 16), bd=15)
txt_password.grid(row=4, stick="e")
txt_result = Label(Buttons)
txt_result.pack(side=TOP)
#==================================ENTRY WIDGET=======================================
firstname = Entry(Forms, textvariable=FIRSTNAME, width=30)
firstname.grid(row=0, column=1)
lastname = Entry(Forms, textvariable=LASTNAME, width=30)
lastname.grid(row=1, column=1)
address = Entry(Forms, textvariable=ADDRESS, width=30)
address.grid(row=2, column=1)
username = Entry(Forms, textvariable=USERNAME, width=30)
username.grid(row=3, column=1)
password = Entry(Forms, textvariable=PASSWORD, show="*", width=30)
password.grid(row=4, column=1)
#==================================BUTTONS WIDGET=====================================
btn_exit = Button(Buttons, width=10, text="Exit", command=Exit)
btn_exit.pack(side=LEFT)
#==================================LIST WIDGET========================================
scrollbary = Scrollbar(Left, orient=VERTICAL)
scrollbarx = Scrollbar(Left, orient=HORIZONTAL)
tree = ttk.Treeview(Left, columns=("MemID", "Firstname", "Lastname", "Address", "Username", "Password"), selectmode="extended", height=500, yscrollcommand=scrollbary.set, xscrollcommand=scrollbarx.set)
scrollbary.config(command=tree.yview)
scrollbary.pack(side=RIGHT, fill=Y)
scrollbarx.config(command=tree.xview)
scrollbarx.pack(side=BOTTOM, fill=X)
tree.heading('Firstname', text="Firstname", anchor=W)
tree.heading('Lastname', text="Lastname", anchor=W)
tree.heading('Address', text="Address", anchor=W)
tree.heading('Username', text="Username", anchor=W)
tree.heading('Password', text="Password", anchor=W)
tree.column('#0', stretch=NO, minwidth=0, width=0)
tree.column('#1', stretch=NO, minwidth=0, width=0)
tree.column('#2', stretch=NO, minwidth=0, width=80)
tree.column('#3', stretch=NO, minwidth=0, width=120)
tree.column('#4', stretch=NO, minwidth=0, width=80)
tree.column('#5', stretch=NO, minwidth=0, width=150)
tree.column('#6', stretch=NO, minwidth=0, width=120)
tree.pack()
tree.bind('<Double-Button-1>', selectedRow)