I have a program I am writing that has a root Tk()
window as well as an admin Toplevel()
that opens based on a condition. Inside the admin toplevel I have an Entry()
however I cannot use .get()
without getting this error
AttributeError: 'NoneType' object has no attribute 'get'
Here is a sample code of my problem
import tkinter
from tkinter import *
root = tkinter.Tk()
root.minsize(width=800, height = 600)
root.maxsize(width=800, height = 600)
def proceed():
admin = tkinter.Toplevel()
admin.minsize(width=800, height = 600)
admin.maxsize(width=800, height = 600)
entry = Entry(admin).pack()
entry.get()
button = Button(root, text="Proceed", command=proceed).pack()
mainloop()