tkinter button widget

klappnase klappnase at web.de
Sat May 15 21:14:37 EDT 2004


"Elaine Jackson" <elainejackson7355 at home.com> wrote in message news:<Ygxpc.492595$Ig.75690 at pd7tw2no>...
> I've got a script where a button gets pushed over and over: to cut down on the
> carpal tunnel syndrome I'd like to have the button respond to presses of the
> Enter key as well as mouse clicks; can somebody clue me in regarding how this is
> done? Muchas gracias.
> 
> Peace

b = Button(master, command=do_something)
b.bind('<Return>', lambda event, key='<space>' : b.event_generate(key))

I hope this helped

Michael



More information about the Python-list mailing list