python-3.xtkinter

How to replace the icon in a Tkinter app?


I am using Python 3.5.0 on Windows 10 and want to replace this:

with something else.


Solution

  • To change the icon you should use iconbitmap or wm_iconbitmap I'm under the impression that the file you wish to change it to must be an ico file.

    import tkinter as tk
    
    root = tk.Tk()
    root.iconbitmap("myIcon.ico")