Click here to Skip to main content
15,891,633 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i set an image as a background in Tkinter? I have the correct image and everything but nothing comes up

What I have tried:

root = tk.Tk()
root.title("Tool")
root.configure()

frame = tk.Frame(root)
frame.pack()
background_image = tk.PhotoImage('pic.jpg')
background_label = tk.Label(frame, image=background_image)
Posted
Updated 14-Apr-18 20:29pm

1 solution

You need to tell Tkinter where to display the image: python - How to use an image for the background in tkinter? - Stack Overflow[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900