K Viltersten
3/7/2008 2:57:00 PM
I entered the code from tkinter.pdf, section
2 but for reason, the application doesn't
close as i press the quit-button.
The wondow itself vanishes if i click the
cross in the upper-right corner but pressing
the quit-button only makes it "pressed".
Then, the program freezes.
This is the code.
from Tkinter import *
class Demo (Frame):
def __init__ (self, master = None):
Frame.__init__ (self, master)
self.grid ()
self.doLayout ()
def doLayout (self):
self.quitButton = Button (
self,
text = "Quit",
command = self.quit)
self.quitButton.grid ()
d = Demo ()
d.master.title ("the coolest demo ever")
d.mainloop ()
--
Regards
Konrad Viltersten
--------------------------------
sleep - a substitute for coffee for the poor
ambition - lack of sense to be lazy