Python Forum
[Tkinter] Window unresponsive when executed.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Window unresponsive when executed.
#1
I ran the following code in Spyder with Python3 interpreter in windows7.

import tkinter
import tkinter.simpledialog

root = tkinter.Tk()

name = tkinter.simpledialog.askstring('Name','entername')

After I enter the name in prompt and click OK the tk window get unresponsive. Finally when I close the window after many clicks the Kernel dies and is restarted. Please tell me why this happens and a way to fix it.
Reply
#2
You should have root.mainloop() in there somewhere, so the gui will listen to os events (like the CloseWindow event).
Reply
#3
there are some examples here: http://nullege.com/codes/search/tkinter.simpledialog
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] program unresponsive during pynput mouse click RobotTech 1 944 May-07-2020, 04:43 PM
Last Post: RobotTech
  [Tkinter] messagebox is not being executed please help erwinsiuda 2 551 Apr-02-2020, 01:56 AM
Last Post: Larz60+
  tkinter window and turtle window error 1885 3 2,279 Nov-02-2019, 12:18 PM
Last Post: 1885
  Tkinter GUI is unresponsive in a thread sandarbhasthana 2 2,205 May-06-2019, 03:20 PM
Last Post: sandarbhasthana
  update a variable in parent window after closing its toplevel window gray 5 4,727 Mar-20-2017, 10:35 PM
Last Post: Larz60+
  [WxPython] Which def is executed? merlem 10 4,452 Feb-10-2017, 11:28 AM
Last Post: Yoriz
  [xbmc] How to block the code from executed twice under the loop chris0147 29 12,918 Oct-26-2016, 05:34 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020