]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-75952: Document negative offsets in tkinter geometry strings (GH-152531...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 5 Jul 2026 11:15:44 +0000 (13:15 +0200)
committerGitHub <noreply@github.com>
Sun, 5 Jul 2026 11:15:44 +0000 (11:15 +0000)
Tk geometry strings can contain a negative offset (e.g. 200x100+-9+-8)
when a window edge is positioned beyond the corresponding screen edge.
Note this in the geometry() and winfo_geometry() documentation.
(cherry picked from commit 19b5e8e1f510eb2fdd3f6261006b61f8cf441101)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Doc/library/tkinter.rst

index 0b66296641e21107b638d625e1e9aff120df8cdb..7e4ac1b0f791c1e1f9b2ba50f9432719c6ae8973 100644 (file)
@@ -1994,6 +1994,7 @@ Base and mixin classes
 
       Return the geometry of the widget, in the form ``widthxheight+x+y``.
       All dimensions are in pixels.
+      An offset can be negative; see :meth:`~Wm.geometry`.
 
    .. method:: winfo_height()
 
@@ -2454,6 +2455,8 @@ Base and mixin classes
       *width* and *height* are in pixels (or grid units for a gridded window);
       a position preceded by ``+`` is measured from the left or top edge of the
       screen and one preceded by ``-`` from the right or bottom edge.
+      An offset can be negative, as in ``'200x100+-9+-8'``, when the window
+      edge is positioned beyond the corresponding screen edge.
       An empty string cancels any user-specified geometry, letting the window
       revert to its natural size.
       With no argument, return the current geometry as a string of the form