New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entry Widget Not Editable under Windows XP with dialog call. #53882
Comments
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 http://mail.python.org/pipermail/tkinter-discuss/2010-August/002332.html 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. |
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. |
That sounds nice. |
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 http://effbot.org/tkinterbook/entry.htm works on my Win7 machine. import tkinter as tk
master = tk.Tk()
e = tk.Entry(master)
e.pack()
e.focus_set()
def callback():
print(e.get())
b = tk.Button(master, text="get", width=10, command=callback)
b.pack()
tk.mainloop() |
My testing was inadequate. From bpo-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 bpo-42867 is to call after_idle() at some point. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: