Repository navigation
tkinter geometry string +- when window ovelaps left or top of screen #75952
Description
Activity
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
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on 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#M42If you want to improve Tkinter documentation, patches are welcome.
Reacted by ThingamabobsCoding- addeddocsDocumentation in the Doc dirDocumentation in the Doc dir3.7 (EOL)end of lifeend of life
on Oct 12, 2017 - addedtype-featureA feature request or enhancementA feature request or enhancementand removedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Oct 12, 2017 - added 4 commits that reference this issue
on 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!
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:
bugs.python.org fields:
Linked PRs