Answers for "how to configure a button in tkinter"

2

how to make custom buttons tkinter

from tkinter import *

root = Tk()

button = Button(root, text="Click me!")
img = PhotoImage(file="C:/path to image/example.gif") # make sure to add "/" not ""
button.config(image=img)
button.pack() # Displaying the button

root.mainloop()
Posted by: Guest on July-18-2020
0

how to set beutfull tkinter button

tkinter
Posted by: Guest on December-20-2020

Code answers related to "how to configure a button in tkinter"

Python Answers by Framework

Browse Popular Code Answers by Language