Monday, March 2, 2020

Entry widget in tkinter python


from tkinter import *
root = Tk()
root.title("Basic Entry Widget")

ent = Entry(root)
ent.pack()

def show_data():
    print(ent.get())
Button(root,
      text="Show Data",
      command=show_data).pack()

root.mainloop()

output

python class topic video