0

I use python 3.13.3 on a macbook air M1 (2020) with Sequoia 15.5

I am testing the following program:

import tkinter as tk

def button_clicked():
    print("Button was clicked!")

window = tk.Tk()
window.title("Button Test")

button = tk.Button(window, text="Click Me", command=button_clicked)
button.pack(padx=20, pady=20)

window.mainloop()

The button created reacts only when I use a deep click on the touchpad. Neither tapping nor simple clicks have an effect. Did somebody encounter the same?

2
  • It's a little more complicated. Once you get a click to register, simple clicks work. It also happens with a mouse, not just the touchpad. I haven't been able to figure out what specifically gets it unstuck. Sometimes a long click on the window seems to do it. Commented May 19 at 20:38
  • There's nothing wrong with your code. How did you install python and tkinter? Commented May 20 at 9:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.