Buttons in tkinter – When clicked: reveal something behind it

I am new to python and tkinter. I’m looking to make a simple window with a few buttons. When a button is pressed, I wish for it to disappear and instead reveal something behind it, a number, for …

How to make a shape a button in Tkinter

Is there a way to make a shape a button in a tkinter canvas? button = Canvas.create_rectangle(100, 100, 200, 200) Or, to put it simply, is there a way to figure out if the user clicked the rectangle …

Buttons in a for loop to update labels in a for loop?

Trying to get individual buttons to update individual labels in tkinter. Here’s my code: When you run the code there are three buttons in a column next to three labels in the next column over. What I’m trying to do is get it so that each button changes the label next to it. What happens when I run the code is every button modifies the last label and the other two labels are untouched. Any help is awesome, thanks! Answer This will work for you. I don’t think you understand how the buttons work. Once you .grid() them they are

Change the value of a variable with a button (Tkinter)

I want to change the value of a variable just with a button, i don’t want to create a new entire function just like that: How i can do that? (I need to do that for six buttons, making six functions it’s not an option) Answer i need to make this for 6 buttons… If each button modifies the same global variable, then have makeSomething accept a value parameter: If each button modifies a different global, then condense all your globals into a single global dict, which makeSomething can then modify. In either case, you still only require one function.