Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d1df81a

Browse files
authoredFeb 3, 2022
bpo-46630: Fix initial focus of IDLE query dialogs (pythonGH-31112)
On Windows, one had to Tab or click on the entry box to get a cursor and be able to enter anything.
1 parent 916d0d8 commit d1df81a

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed
 

‎Lib/idlelib/NEWS.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Released on 2022-10-03
44
=========================
55

66

7+
bpo-46630: Make query dialogs on Windows start with a cursor in the
8+
entry box.
9+
710
bpo-46591: Make the IDLE doc URL on the About IDLE dialog clickable.
811

912
bpo-45296: Clarify close, quit, and exit in IDLE. In the File menu,

‎Lib/idlelib/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def __init__(self, parent, title, message, *, text0='', used_names={},
8383

8484
if not _utest:
8585
self.deiconify() # Unhide now that geometry set.
86+
self.entry.focus_set()
8687
self.wait_window()
8788

8889
def create_widgets(self, ok_text='OK'): # Do not replace.
@@ -100,7 +101,6 @@ def create_widgets(self, ok_text='OK'): # Do not replace.
100101
text=self.message)
101102
self.entryvar = StringVar(self, self.text0)
102103
self.entry = Entry(frame, width=30, textvariable=self.entryvar)
103-
self.entry.focus_set()
104104
self.error_font = Font(name='TkCaptionFont',
105105
exists=True, root=self.parent)
106106
self.entry_error = Label(frame, text=' ', foreground='red',
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Make query dialogs on Windows start with a cursor in the entry box.

0 commit comments

Comments
 (0)
Please sign in to comment.