0

I Want to collapse the Frames in the main window:

import tkinter as tk

def main():
    main=tk.Tk()
        
    main.window = ClassOfFrameT(main).grid(row=0,column=0)
    #I Want to grid_forget() the ClassOfFrame Frame
    
    main.mainloop()

if __name__ == "__main__":
    main()

I tryed something like main.windodw.grid_forget() but AttributeError: 'NoneType' object has no attribute 'RadiosVehicle' was the error

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
Borat
  • 1
  • 2
    Does this answer your question? [Tkinter: AttributeError: NoneType object has no attribute ](https://stackoverflow.com/questions/1101750/tkinter-attributeerror-nonetype-object-has-no-attribute-attribute-name) – Wups Sep 19 '20 at 17:05
  • 1
    `ClassOfFrameT(main)` whats this? Shouldnt it be `tk.Frame(..)` and then `grid()` it in the next line and then change your `def main()` to something else, so python isnt confused between function and window variable. Also try giving a proper variable name – Delrius Euphoria Sep 19 '20 at 17:06

0 Answers0