4. Building a Simple User Information Form with Python Tkinter | GUI Application Tutorial

Published: 24 December 2023
on channel: KidzCode AI
207
1

Learn how to create a user-friendly GUI application in Python using Tkinter! In this tutorial, we'll build a simple User Information Form that collects a user's first name, last name, and email address. The script includes a responsive interface and a 'Save and Display' button that showcases the entered information. Follow along with the code, and enhance your Python GUI skills! #Python #Tkinter #GUIApplication #ProgrammingTutorial.

code goes here-
import tkinter as tk


root = tk.Tk()
all the widgets
title = tk.Label(root,text="Name and E-mail Reader\n")
first_name_label = tk.Label(root,text="Type your first name:")
first_name_entry = tk.Entry(root)
last_name_label = tk.Label(root,text="Type your last name:")
last_name_entry = tk.Entry(root)
email_label = tk.Label(root,text="Type your email:")
email_entry = tk.Entry(root)
save_button = tk.Button(root,text="Save & Display")
display_label = tk.Label(root,text="")


packing
title.pack()
first_name_label.pack()
first_name_entry.pack()
last_name_label.pack()
last_name_entry.pack()
email_label.pack()
email_entry.pack()
save_button.pack()
display_label.pack()

#function to read and save all the details from the entries
def read_data():
first_name = first_name_entry.get()
last_name = last_name_entry.get()
email = email_entry.get()
pass the details to the display label
display_label.config(text="Hello, "+first_name+" "+last_name+"!"+"\nEmail: "+email)

pass the function to the button
save_button.config(command=read_data)




root.mainloop()


On this page of the site you can watch the video online 4. Building a Simple User Information Form with Python Tkinter | GUI Application Tutorial with a duration of hours minute second in good quality, which was uploaded by the user KidzCode AI 24 December 2023, share the link with friends and acquaintances, this video has already been watched 207 times on youtube and it was liked by 1 viewers. Enjoy your viewing!