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
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
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")
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 =