AttributeError: 'NoneType' object has no attribute '_root' (My case is different)

后端 未结 1 1902
隐瞒了意图╮
隐瞒了意图╮ 2021-01-29 12:07
from tkinter import*
decision=0
fs = IntVar()
def coverscreen():
    slide=Tk() #Init window
    slide.title(\'The Castle of Redemption BETA\') #Give window a title
             


        
相关标签:
1条回答
  • 2021-01-29 13:07

    The problem is that you are defining fs = IntVar() before you have created the root window Tk().

    Note: It is not recommended to create multiple root windows Tk(), if you want to display a second or more windows use a Toplevel widget.

    If you only want a single window at all times then use frames to contain the widow contents then create and destroy those while using the same root.

    0 讨论(0)
提交回复
热议问题