Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python how to add picture to label with tkinter

# python import tkinter
from tkinter import *
# creating a window
root = Tk() 
root.geometry("500x500") # sets the width of a window
img = PhotoImage(file="info.png") # you need to have a real file in the folder
# you are working with
eg = Label(root, image=img)
# creats a program to show the window
root.mainloop()
 
PREVIOUS NEXT
Tagged: #python #add #picture #label #tkinter
ADD COMMENT
Topic
Name
8+7 =