How do I make this image into a button? The picture is what I currently have for
ID: 3605445 • Letter: H
Question
How do I make this image into a button? The picture is what I currently have for code, i just need the image to be a button rather than just an image. This has to be in Python!
league calculator.py - C:/Users/Higgy73/Desktop/League Calculator/league calculator.py (3.6.2) File Edit Format Run Options Window Help from tkinter import* class ImageDemo: def init__(self): window1=Tk ( ) # create window windowl.geometry ("1000x1000") #window size windowl. title ("Choose a Champion") #window title #create image objects by importing images from files aatroxImage-phot Image (file ="Aatrox.gif") #create a frame to contain label and canvas frame1-Frame (windowl) frame1.pack() canv_1= Canvas (frame 1, height-1000, width=1000, canv1-createimage (65, 65, image= aatrox!mage) canv_1·pack (side=LEFT) bg="gray") - - windowl.mainloop () ImageDemo ()Explanation / Answer
Ans : In this program we can make image as button by following code :
We can insert the above code after creating window object.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.