I wanted to make button in tkinter, but when I started program, the command always calls when code just starts. Here is example code:
import tkinter as tk
from tkinter import messagebox
window = tk.Tk()
window.title("pls work")
window.wm_geometry("100x100")
def message():
messagebox.showinfo("Hi there")
button = tk.Button(text="Hello", command=message())
button.grid(column=0, row=0)
while True:
window.update()
After, button doesn't work anymore.
I don't know what I'm doing wrong, so I need help.