I'm not sure what I'm doing wrong because this works on a different code I've made but not this one here
import tkinter as tk
from PIL import ImageTk
roon= tk.Tk()
canvas1 = tk.Canvas(roon, width = 400, height = 400, bg='lightblue')
canvas1.pack(fill = "both", expand = True)
title = tk.Label(roon, text= "CSVrundown", bg="lightblue",fg="darkgreen", font=("rockwell", 30 ,'bold'))
canvas1.create_window(200, 40, window=title)
def csrd (times):
print("why must you be this way")
entry1 = tk.Entry (roon)
canvas1.create_window(200, 140, window=entry1)
but1 = tk.Button(text='Question 1', command=csrd(15))
canvas1.create_window(200, 100, window=but1)
roon.mainloop()
I wanna have it so the code executes when you press the button I'm very lost on what to do, I'm tired and I don't know who else to ask