Home > Enterprise >  Tkinter label and button not rendering
Tkinter label and button not rendering

Time:02-08

I have a tkinter window of dimensions 300x300 pixel and a button and a label that are supposed to appear but they are not. I am only starting with tkinter so not too sure what I am doing wrong from myoutput

CodePudding user response:

You forgot frame.pack()

...

if __name__ == "__main__":
    app = App("300x300")
    frame = Window(app)
    frame.pack()  # <- HERE
    app.mainloop()

enter image description here

  •  Tags:  
  • Related