This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Entry Widget Not Editable under Windows XP with dialog call.
Type: behavior Stage: resolved
Components: Tkinter, Windows Versions: Python 2.6
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: claird, firatozgul, gpolo, terry.reedy
Priority: normal Keywords:

Created on 2010-08-24 17:49 by firatozgul, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg114800 - (view) Author: Firat Ozgul (firatozgul) Date: 2010-08-24 17:49
In a Tkinter application that has an Entry() widget on the main window and an askopenfilename() dialog, one should be able to click and type into the Entry() widget as soon as the askopenfilename() dialog is closed. However, the askopenfilename() dialog renders the Entry() widget on the main window unusable/non-editable.

This issue was explored in at Tkinter-Discuss mailing list. All details relating to the issue can be followed from there.

It seems that only Windows OS is affected by this issue. In Ubuntu Karmic Koala (GNOME) and Debian (IceWM), at least, this issue cannot be reproduced, and everything works like expected.
msg114805 - (view) Author: Cameron Laird (claird) Date: 2010-08-24 19:22
If it'll help, I can translate this to Tcl/Tk, and report it to the Tk maintainers.

My first impression, which is in the realm of wild speculation, is that this is a Tk defect which has already been corrected.  A bit more care in composition of a homologous Tk-coded example should swiftly confirm or falsify that proposition.
msg114812 - (view) Author: Firat Ozgul (firatozgul) Date: 2010-08-24 20:03
That sounds nice.
msg218765 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-05-18 23:16
The reverenced post did not give a runnable minimal example with the claimed bug, but only described more complex code at a now dead link. The following from works on my Win7 machine.

import tkinter as tk
master = tk.Tk()
e = tk.Entry(master)
def callback():
b = tk.Button(master, text="get", width=10, command=callback)
msg384701 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-01-09 00:18
My testing was inadequate.  From #42867, it appears that 0. the bug is limited to Windows; 1. opening a canned dialog or message box is part of getting the buggy behavior; 2. timing is involved; 3. the bug can be exhibited on Windows directly with wish/tk, so that it is a 3rd party tcl/tk issue and not a tkinter issue.  Hence changing the issue resolution.

A workaround mentioned in both the referenced tkinter thread and #42867 is to call after_idle() at some point.
Date User Action Args
2022-04-11 14:57:05adminsetgithub: 53882
2021-01-09 00:18:24terry.reedysetresolution: out of date -> third party
messages: + msg384701
title: Entry Widget Not Editable under Windows XP -> Entry Widget Not Editable under Windows XP with dialog call.
2014-05-18 23:16:57terry.reedysetstatus: open -> closed
resolution: out of date
messages: + msg218765

stage: resolved
2014-05-18 18:04:03serhiy.storchakasetnosy: + terry.reedy
2010-09-26 12:54:05pitrousetnosy: + gpolo
2010-08-24 20:03:33firatozgulsetmessages: + msg114812
2010-08-24 19:22:18clairdsetnosy: + claird
messages: + msg114805
2010-08-24 17:49:40firatozgulcreate