Sckoriy
0
Q:

how to change tkinter icon

from tkinter import Tk
master = Tk()

photo = PhotoImage(file = "Any image file")
master.iconphoto(False, photo)
2
# Importing Tkinter module 
from tkinter import * from tkinter.ttk import *
  
# Creating master Tkinter window 
master = Tk() 
  
# Creating object of photoimage class 
# Image should be in the same folder 
# in which script is saved 
p1 = PhotoImage(file = 'info.png') 
  
# Setting icon of master window 
master.iconphoto(False, 'info.png') 
  
# Creating button 
b = Button(master, text = 'Click me !') 
b.pack(side = TOP) 
  
# Infinite loop can be terminated by 
# keyboard or mouse interrupt 
# or by any predefined function (destroy()) 
mainloop() 
1

New to Communities?

Join the community