Jul-27-2019, 11:21 PM
Starting to learn Python though I know other languages such as VB.NET
I create 5 buttons.
I don't know how to write a generic callback function that changes the background color for only the button that was clicked.
I create 5 buttons.
tkinter.Button(Gui, "1", command=callback).grid(row=0, column=1) ... tkinter.Button(Gui, "5", command=callback).grid(row=0, column=5)When I click on any of the 5 buttons, I want to change its background color.
I don't know how to write a generic callback function that changes the background color for only the button that was clicked.