1
I wonder how to add a shortcut menu item. I’ve been searching and seen it can be done using a special function common to all widgets in the module tkinker
, that is to say the function bind
.
What I tried to do was this:
menu_file.add_command(label="Exit", command=exitf, accelerator="Ctrl+Q")
menu_file.bind("<Control-Q>", exitf)
where exitf
is a function that closes the application.
But I honestly didn’t understand exactly how this function works bind
or the one called bind_all
.
What I realized was that the first parameter is the event and the second is Handler, could explain to me better and more in detail how they work or indicate me a good site where I can study this?