我正在嘗試使用按鈕創(chuàng)建一個鍵綁定。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)預期結果:按下回車/回車鍵時執(zhí)行登錄功能實際結果:不執(zhí)行登錄功能,按下回車/回車鍵時未產生錯誤代碼
添加回答
舉報
0/150
提交
取消