[Tutor] tkinter question

Khalid Al-Ghamdi emailkgnow at gmail.com
Fri Apr 27 06:08:35 CEST 2012


hi everyone,

I'm usting python 3.2 on windows, and I'm doing these GUI exercises using
tkinter.

I've created this simple window with two widgets (a label and a button) the
button is supposed to  exit the root window, but the problem is it doesn't
seem to, for some reason. It looks like it is "trying to", but the window
persists for some reason and becomes unresponsive. I'm NOT doing this in
IDLE as i know there are issues with this. so is it an issue the Windows?
or What?


   1. import tkinter
   2. top=tkinter.Tk()
   3.
   4. salam = tkinter.Label(top,text='salam')
   5. salam.pack()
   6.
   7. quit= tkinter.Button(top, text='quit', command=top.quit,bg='red',fg=
   'white')
   8. *
   *
   9. quit.pack(fill=tkinter.X)
   10.
   11. tkinter.mainloop()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120427/d855aa96/attachment.html>


More information about the Tutor mailing list