Home - All the pastes - Authored by Thooms
Raw version
1 2 3 4 5 6 7 8 9 10 11
import tkinter as tk def changeColor(): btn.configure(bg='#f00') root = tk.Tk() btn = tk.Button(root, text='Test', command=changeColor) btn.pack() root.mainloop()