导入Tkinter后label组件功能无法使用:NameError: name 'Lable' is not defined
百度搜索了一下貌似大家都没有遇到过这个问题,特发帖求助!!源代码:
from tkinter import *
root=Tk()
textLable=Lable(root,text='the film you download contains forbiden content for teenages, pls see it when you are older than 18')
textLable.pack(side=LEFT)
photo=PhoteImage(file='18.jpg')
imgLable=Lable(root,image=photo)
imgLable.pack(side=RIGHT)
mainloop()
完整的报错信息:
Traceback (most recent call last):
File "F:/python learning/tk3.py", line 3, in <module>
textLable=Lable(root,text='the film you download contains forbiden content for teenages, pls see it when you are older than 18')
NameError: name 'Lable' is not defined 您好,tkinter里对应的函数为Label.请检查哦 dlnb526 发表于 2020-3-12 17:14
您好,tkinter里对应的函数为Label.请检查哦
谢谢,犯了好低级的错误却没发现{:5_100:}
页:
[1]