使用Tkinter做页面时,没有按下按钮,command控制的函数却自动执行
Button按钮用法:
#按钮控制的函数insert()无参时
tk.Button(window, text='按钮名称', font=('Arial', 12),
width=10, height=1, command = insert())
#按钮控制的函数insert(参数1...)有参时
tk.Button(window, text='按钮名称', font=('Arial', 12),
width=10, height=1, command = lambda: insert(参数1...))