Answers for "ui for 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
1

different states of a button tkinter

Tkinter Button has two states,
NORMAL - The button could be clicked by the user.
DISABLE - The button is not clickable.
Posted by: Guest on November-05-2021

Python Answers by Framework

Browse Popular Code Answers by Language