mirror of https://github.com/python/cpython.git
bpo-43534: Make dialogs in turtle.textinput() and turtle.numinput() transitient again (GH-24923)
(cherry picked from commit b5adc8a7e5
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
d962b00fcf
commit
7248ce30bb
|
@ -826,7 +826,7 @@ def textinput(self, title, prompt):
|
||||||
>>> screen.textinput("NIM", "Name of first player:")
|
>>> screen.textinput("NIM", "Name of first player:")
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return simpledialog.askstring(title, prompt)
|
return simpledialog.askstring(title, prompt, parent=self.cv)
|
||||||
|
|
||||||
def numinput(self, title, prompt, default=None, minval=None, maxval=None):
|
def numinput(self, title, prompt, default=None, minval=None, maxval=None):
|
||||||
"""Pop up a dialog window for input of a number.
|
"""Pop up a dialog window for input of a number.
|
||||||
|
@ -847,7 +847,8 @@ def numinput(self, title, prompt, default=None, minval=None, maxval=None):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return simpledialog.askfloat(title, prompt, initialvalue=default,
|
return simpledialog.askfloat(title, prompt, initialvalue=default,
|
||||||
minvalue=minval, maxvalue=maxval)
|
minvalue=minval, maxvalue=maxval,
|
||||||
|
parent=self.cv)
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
:func:`turtle.textinput` and :func:`turtle.numinput` create now a transient
|
||||||
|
window working on behalf of the canvas window.
|
Loading…
Reference in New Issue