
It says icon.ico not defined, what should I do? The icon.ico is in the same folder as the script im trying to run.
from tkinter import * from PIL import ImageTk, Image root = Tk() root.title('Images') root.iconbitmap('icon.ico') my_img = ImageTk.PhotoImage(Image.open("Pasi.png")) my_label = Label(image=my_img) my_label.pack() button_quit = Button(root, text="Exit", command=root.quit) button_quit.pack() root.mainloop()
Gribouillis write Aug-07-2022, 08:11 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.