Python: Buttons: Why are the commands always executed immediately?
Hello! I'm doing some testing with graphical programming. While playing around with buttons and menu bars, I noticed that commands were always executed immediately. This sometimes led to error messages or malfunctions.
Why is this happening and can it be stopped?
Example:
When I run this program, it prints "Hello World!" three times in the command line, but not when I press a button. Is this because one happens in the command line and the other in the window?
Thank you.
fenster.geometry(“400×400”)
and
firstmenu.add_command(label=”Hi!!”, command=a())
What do you think I’m a little on the hose? 😮