Cristian,
You have to bind your Alt key presses separately. The underline= only
underlines the letter - it does not bind to an event handler.
Here's a snippet that may give you some ideas. Disclaimer: I'm not sure
if its best practice or not.
Malcolm
"""
Treat Alt+I as a shortcut keystroke for
Hi.
I wonder how I can run the code button when you press alt-h.
Use underline, but I can not connect.
code:
import Tkinter
class App:
def __init__(self, master):
self.root = master
b = Tkinter.Button(self.root, text='Hello', underline=0)
b.pack()
b.bind('',