Python Program with GUI Tkinter
from tkinter import*
root = Tk()
def getvals():
print("its work")
root.geometry("500x200")
Label(root,text="Welcome to Lalita Travels", font="comic 13 bold").grid(row=0, column=3)
name=Label(root, text="Name")
phone=Label(root, text="Phone number")
gender=Label(root, text="Gender")
emergency=Label(root, text="Emergancy Contact")
name.grid(row=1, column=2)
phone.grid(row=2, column=2)
gender.grid(row=3, column=2)
emergency.grid(row=4, column=2)
name_value=StringVar()
phone_value=IntVar()
gender_value=StringVar()
emergency_value=IntVar()
name_entry=Entry(root, textvariable=name_value)
phone_entry=Entry(root, textvariable=phone_value)
gender_entry=Entry(root, textvariable=gender_value)
emergency_entry=Entry(root, textvariable=emergency_value)
name_entry.grid(row=1, column=3)
phone_entry.grid(row=2, column=3)
gender_entry.grid(row=3, column=3)
emergency_entry.grid(row=4, column=3)
food_services=Checkbutton(text="Want to book your sheet?")
food_services.grid(row=5, column=3)
Button(text="Submit to Lalita Travels", command=getvals).grid(row=6,column=3)
root.mainloop()
Comments