本文共 255 字,大约阅读时间需要 1 分钟。
当使用如下代码时,会出现如题错误
ent2=Entry(root,width=10).place(x=20,y=40,anchor='nw')num=ent2.get()
解决方法:
改为ent2=Entry(root,width=10)ent2.place(x=20,y=40,anchor='nw')num=ent2.get()
即可正常运行
原因:place,pack,grid有副作用。转载地址:http://ykwai.baihongyu.com/