this seemed easy…
I wrote a dialog widget where I put some entries, buttons etc – among which a button I’d like to activate by mouse click, but also by pressing return.
I read time ago that it was just necessary to set its default option, but I think that it changed in recent versions.
Do you know how it is possible to set it ?
thanks!
Bind a callback to the
'<Return>'event to the window (often calledrootin Tkinter) or to the containing frame. Have the callback accept an event parameter (which you can ignore) and have itinvoke()your button’s callback.