my tkinter doesnt show up anything i have coded

1825 views python
-4

i wrote this code, but when i run it it doesnt show any error, but the app is blank can you please show where i have done the mistake. Thank You

from tkinter import *
import csv

import os
os.chdir(r"C:\Users\Umer Selmani\Desktop\prog.practice\MP1")

root=Tk()
class Diet:
    def __init__(self,Tops,Lefts, Rights):

        self.Tops=Frame(root,width= 200,height=200).pack(side=TOP)

        self.Lefts=Frame(root,width= 200,height=200).pack(side=LEFT)

        self.Rights=Frame(root,width= 200,height=200).pack(side=RIGHT)

        self.label1=Label(Tops,font=("ariel","bold" ,20),text="Sehir Cafeteria",
                          bg="darkblue").grid(row=0,columns=0)

root.mainloop()

answered question

1 Answer

1

You need to do

diet = Diet()
diet.pack()

posted this

Have an answer?

JD

Please login first before posting an answer.