You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tkinter geometry string +- when window ovelaps left or top of screen #75952
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:
assignee=Noneclosed_at=Nonecreated_at=<Date2017-10-12.13:26:16.602>labels= ['3.7', 'type-feature', 'expert-tkinter', 'docs']
title='tkinter geometry string +- when window ovelaps left or top of screen'updated_at=<Date2017-10-12.13:37:55.646>user='https://bugs.python.org/8baWnoVi'
the root.geometry() top-level window method returns strings like "212x128+-9+-8" when the window is located in the top left corner. The documentation only describes geometry strings containing + or - location coordinates. If this is correct behaviour, the documentation should provide a better description of the syntax - perhaps a regular expression such as: "\d+x\d+(\+|-|\+-)\d+(\+|-|\+-)\d+" and some text indicating that a +- coordinate indicates a value to the left of or above the screen.
Tested Linux Mint 18, Python 3.5.3, tkinter 8.6
Behaviour is consistent with python 2.7 Tkinter 8.6
Documented in #152531: the geometry-string docs now explain the ±x±y form and that an offset itself goes negative when the window overlaps the left or top edge (e.g. +-9). Closing as fixed — thanks for the report!
Activity
8baWnoVi commentedon Oct 12, 2017
the root.geometry() top-level window method returns strings like "212x128+-9+-8" when the window is located in the top left corner. The documentation only describes geometry strings containing + or - location coordinates. If this is correct behaviour, the documentation should provide a better description of the syntax - perhaps a regular expression such as: "\d+x\d+(\+|-|\+-)\d+(\+|-|\+-)\d+" and some text indicating that a +- coordinate indicates a value to the left of or above the screen.
Tested Linux Mint 18, Python 3.5.3, tkinter 8.6
Behaviour is consistent with python 2.7 Tkinter 8.6
serhiy-storchaka commentedon Oct 12, 2017
Tkinter is just a wrapper around the Tk library. It returns what Tk returns. See Tk documentation:
https://www.tcl.tk/man/tcl8.6/TkCmd/winfo.htm#M15
https://www.tcl.tk/man/tcl8.6/TkCmd/wm.htm#M42
If you want to improve Tkinter documentation, patches are welcome.
gh-75952: Document negative offsets in tkinter geometry strings (GH-1…
[3.13] gh-75952: Document negative offsets in tkinter geometry strings (
[3.15] gh-75952: Document negative offsets in tkinter geometry strings (
[3.14] gh-75952: Document negative offsets in tkinter geometry strings (
serhiy-storchaka commentedon Jul 5, 2026
Documented in #152531: the geometry-string docs now explain the
±x±yform and that an offset itself goes negative when the window overlaps the left or top edge (e.g.+-9). Closing as fixed — thanks for the report!