Tkinter: neither underline=1 nor bind() work on a Button
morden
morden at shadows.net
Mon Jan 13 23:15:03 EST 2003
Here is modified snippet from Dialog.py:
if __name__ == '__main__':
t = Button(None, {'text': 'Test',
'command': _test,
Pack: {}}, underline=1)
t.bind('<Key-Meta_L>, <Key-t>', _test)
t.bind('<Key-Alt_L>, <Key-t>', _test)
t.bind('<Key-t>', _test)
q = Button(None, {'text': 'Quit',
'command': t.quit,
Pack: {}})
t.mainloop()
Alt-t does not work. Neither does Ctrl-t or plain t.
Pressing the button with the mouse does invoke _test.
Alt-e does not work.
Any ideas on how to fix this?
More information about the Python-list
mailing list