ウィジェットの状態を変更する必要があるプログラムがありますが、問題は次のエラーが発生し続けることです。
Traceback (most recent call last):
File "C:\Users\Public\Documents\Programming\Spellox\Spellox.py", line 67, in <module>
new_word()
File "C:\Users\Public\Documents\Programming\Spellox\Spellox.py", line 37, in new_word
entry['state'] = DISABLED
TypeError: 'NoneType' object does not support item assignment
エントリ ウィジェットのコードは次のとおりです。
from tkinter import *
import time
root = Tk()
entry = Entry(root, fg='blue', textvariable=check_var).pack(side=TOP)
def change():
time.sleep(3)
entry['state'] = DISABLED
change()
root.mainloop()
前もって感謝します!