回車鍵按鈕我有一個按鈕:如何綁定在Tkinter的
button3 = Button(app, text="Show Members", width=15, command=lambda: showLDAPMembers(yourName,yourPassword))
如何綁定ENTER鍵呢?我試着這樣做:
app.bind('<Return>', showLDAPMembers(yourName,yourPassword))
,但我得到懸而未決引用錯誤..
def showLDAPMembers(yourName,yourPassword):
app.lb.delete(0,END)
的可能的複製[如何綁定回車鍵在Tkinter的功能如果我?](https://stackoverflow.com/questions/16996432/how-do-i-bind-the-enter-key-to-a-function-in-tkinter) –