Not sure how to change the icon of a simple dialog window. I try to use .bitmap but doesn't work. Need Help
            Asked
            
        
        
            Active
            
        
            Viewed 1,252 times
        
    2 Answers
1
            Just add the default keyword argument to the iconbitmap() for the icon of the root, then all the child windows will inherit the icon.
import tkinter
from tkinter import simpledialog
root = tkinter.Tk()
root.iconbitmap(default="C:\\Users\\username\\random.ico")
dialog = simpledialog.askstring("INFO", "wut ur name?")
root.mainloop()
Result with default:

Results without default:

        Arib Muhtasim
        
- 147
 - 2
 - 8
 
0
            
            
        Are you looking for this
from tkinter import Tk
master = Tk()
photo = PhotoImage(file = "Any image file")
master.iconphoto(False, photo)
        Utpal Kumar
        
- 300
 - 2
 - 13