伙计们。我正在为一个学校项目写代码,我正在计划一个基本的申请。我试图在def中保留一张图片,但在您切换后图像仍保留。我怎样才能让它在你改变功能的时候消失呢?我的代码:
def acceleration():
var.set("Acceleration \n \n \n \n \n \n Acceleration is defined as: \n 'the increase in the rate or speed of something. \n How could this be used in code?' \n \n \n")
photo = PhotoImage(file="accel.gif")
img = Label(root, image=photo)
img.photo = photo
img.pack();
谢谢你们! ~z~布雷登
另外,如果有必要的话,我很乐意把整个剧本给你,不过我想不会
目前没有回答
相关问题 更多 >
编程相关推荐