I'm creating a project for my school using tkinter which focuses on a Dental Clinic. The code that I've posted here opens a window which asks the patient to login or sign up. The function is working properly except the canvas part. When the function is executed; the labels, text fields and the buttons move out of the canvas that I've put in the root window as shown in the screenshot of the output. What changes should I make so that the labels, text fields and buttons are in the canvas and not out of it?
def patclick(self):
root = Tk()
root.title("INSERT DETAILS")
c = Canvas(root, bg="#dfe3ee")
c.grid()
titlelabel = Label(root, text="Please Login to continue")
titlelabel.grid(row=0, columnspan=2)
patnamelabel = Label(root, text="Full Name")
patnamelabel.grid(row=1, column=0, sticky=E)
self.patnameentry = Entry(root)
self.patnameentry.grid(row=1, column=1)
patpwlabel = Label(root, text="Password")
patpwlabel.grid(row=2, column=0, sticky=E)
self.patpwentry = Entry(root, show='*')
self.patpwentry.grid(row=2, column=1)
patloginbutt = Button(root, text="Login")
patloginbutt.grid(row=3, columnspan=2)
newpatlabel = Label(root, text="New Patient?")
newpatlabel.grid(row=4, columnspan=2)
patsignupbutt = Button(root, text="Sign Up")
patsignupbutt.grid(row=5, columnspan=2)