一、問題
在進行tkinter點擊按鈕彈出新的界面的時候遇到了下面的問題:
【_tkinter.TclError: image "pyimage2" doesn't exist】
原因是因為這個photoimage只能加載一次,不能再次使用,因此需要的使用另外一種方式來完成界面的跳轉。
二、解決
在跳轉的界面使用tk.Toplevel()就可以完成界面的跳轉
三、結果
四、總結
附上stackflow博主的地址:https://stackoverflow.com/questions/26097811/image-pyimage2-doesnt-exist
問題解答地址:https://stackoverflow.com/questions/20251161/tkinter-tclerror-image-pyimage3-doesnt-exist