Oops!  Here's the program:
---------------------------
from Tkinter import *     

root = Tk()
z = Label(root, text="Hello World!")
z.grid()
root.mainloop()
------------------------------

Jim

  ----- Original Message ----- 
  From: Jim Morcombe 
  To: python tutor mailing list 
  Sent: Friday, December 28, 2007 3:51 PM
  Subject: [Tutor] Closing GUI program


  I have copied the following program.  When I run it, (By pressing F5 from 
IDLE), it displays the "Hello world" message.

  When I close the window, the "Hello world" message disappears, but it seems 
that the program is still running, because when I close the shell, i get the 
message "The program is still running.  Do you want to kill it?"

  How do I get the program to terminate when the window is closed?

  Jim



------------------------------------------------------------------------------


  _______________________________________________
  Tutor maillist  -  Tutor@python.org
  http://mail.python.org/mailman/listinfo/tutor
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to