Re: Button Widget and Key Binding Problem

2016-10-19 Thread Wildman via Python-list
On Wed, 19 Oct 2016 04:39:03 +0100, MRAB wrote: > The 'bind' method passes an 'event' object when it calls; the 'command' > callback doesn't. > > You don't care about the 'event' object anyway, so you can just define a > single method with a default argument that you ignore: > > def

Re: Button Widget and Key Binding Problem

2016-10-18 Thread MRAB
On 2016-10-19 03:13, Wildman via Python-list wrote: I am working on a program with a GUI created with Tkinter. I want to enable key bindings for the button widgets. Below is some of the code to show how the window and button widget was created. The button calls a routine that will load an

Button Widget and Key Binding Problem

2016-10-18 Thread Wildman via Python-list
I am working on a program with a GUI created with Tkinter. I want to enable key bindings for the button widgets. Below is some of the code to show how the window and button widget was created. The button calls a routine that will load an image. class Window(tk.Frame): def __init__(self,