mirror of
https://github.com/python/cpython.git
synced 2025-09-03 15:31:08 +00:00
bpo-46630: Fix initial focus of IDLE query dialogs (GH-31112)
On Windows, one had to Tab or click on the entry box to get a cursor and be able to enter anything.
This commit is contained in:
parent
916d0d822c
commit
d1df81a730
3 changed files with 5 additions and 1 deletions
|
@ -4,6 +4,9 @@ Released on 2022-10-03
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
|
|
||||||
|
bpo-46630: Make query dialogs on Windows start with a cursor in the
|
||||||
|
entry box.
|
||||||
|
|
||||||
bpo-46591: Make the IDLE doc URL on the About IDLE dialog clickable.
|
bpo-46591: Make the IDLE doc URL on the About IDLE dialog clickable.
|
||||||
|
|
||||||
bpo-45296: Clarify close, quit, and exit in IDLE. In the File menu,
|
bpo-45296: Clarify close, quit, and exit in IDLE. In the File menu,
|
||||||
|
|
|
@ -83,6 +83,7 @@ class Query(Toplevel):
|
||||||
|
|
||||||
if not _utest:
|
if not _utest:
|
||||||
self.deiconify() # Unhide now that geometry set.
|
self.deiconify() # Unhide now that geometry set.
|
||||||
|
self.entry.focus_set()
|
||||||
self.wait_window()
|
self.wait_window()
|
||||||
|
|
||||||
def create_widgets(self, ok_text='OK'): # Do not replace.
|
def create_widgets(self, ok_text='OK'): # Do not replace.
|
||||||
|
@ -100,7 +101,6 @@ class Query(Toplevel):
|
||||||
text=self.message)
|
text=self.message)
|
||||||
self.entryvar = StringVar(self, self.text0)
|
self.entryvar = StringVar(self, self.text0)
|
||||||
self.entry = Entry(frame, width=30, textvariable=self.entryvar)
|
self.entry = Entry(frame, width=30, textvariable=self.entryvar)
|
||||||
self.entry.focus_set()
|
|
||||||
self.error_font = Font(name='TkCaptionFont',
|
self.error_font = Font(name='TkCaptionFont',
|
||||||
exists=True, root=self.parent)
|
exists=True, root=self.parent)
|
||||||
self.entry_error = Label(frame, text=' ', foreground='red',
|
self.entry_error = Label(frame, text=' ', foreground='red',
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Make query dialogs on Windows start with a cursor in the entry box.
|
Loading…
Add table
Add a link
Reference in a new issue