TypeError: 'NoneType' object does not support item assignmen
def handleEnterEvent(event): label1['text'] = "You enter the frame" label2['text'] = "" label3['text'] = "Sichuan University of Science and Engineering"label1 = tkinter.Label(frame1, text="No event happened", foreground="#0000ff", background="#00ff00").place(x=16, y=20) File "/Users/2020yang/Desktop/Python/Python_Basic/excise/GUI/ex1/tkinter_key.py", line 11, in handleLeaveEvent
label1['text'] = "You leave the frame"
TypeError: 'NoneType' object does not support item assignment |
免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。
版权声明:作者保留权利,不代表天盟立场。
|
|
|
|