Re: Bind Escape to Exit

2005-03-13 Thread Martin Franklin
Kent Johnson wrote: Binny V A wrote: Hello Everyone, I am new to python and I am trying to get a program to close a application when the Escape Key is pressed. Here is a version that works. The changes from yours: - Bind , not These amount to the same thing AFAIK - Bind the key to the root, not

Re: Bind Escape to Exit

2005-03-13 Thread Kent Johnson
Binny V A wrote: Hello Everyone, I am new to python and I am trying to get a program to close a application when the Escape Key is pressed. Here is a version that works. The changes from yours: - Bind , not - Bind the key to the root, not the frame - Define a quit() method that takes an event par

Re: Bind Escape to Exit

2005-03-13 Thread Harlin Seritt
Binny, The only way I could think to get this done was like so: from Tkinter import * class Application: # take away the inherited class def end(self, event): self.master.destroy() def createWidgets(self): self.lab = Label(text="Hello World")

Bind Escape to Exit

2005-03-13 Thread Binny V A
Hello Everyone, I am new to python and I am trying to get a program to close a application when the Escape Key is pressed. This is the code that I used - from Tkinter import * class Application(Frame): def createWidgets(self): self.lab =