我正在尝试使用按钮创建一个键绑定。def LoginSQLEvent(event): print("In Keybinded Function") LoginSQL()def LoginSQL(): ...LoginButton = tk.Button(Login, command=LoginSQL, text="Login", font=ButtonFont, bg=ScoutPurple, fg="white")LoginButton.grid(row=4, column=3)LoginButton.bind('<Return>',LoginSQLEvent)预期结果:按下回车/回车键时执行登录功能实际结果:不执行登录功能,按下回车/回车键时未产生错误代码
添加回答
举报
0/150
提交
取消