PySimpleGUI / PySimpleGUI

Python GUIs for Humans! PySimpleGUI is the top-rated Python application development environment. Launched in 2018 and actively developed, maintained, and supported in 2024. Transforms tkinter, Qt, WxPython, and Remi into a simple, intuitive, and fun experience for both hobbyists and expert users.

Home Page:https://www.PySimpleGUI.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] window completely invisible when widow size large than the screen size

jason990420 opened this issue · comments

Type of Issue (Enhancement, Error, Bug, Question)

Bug


Operating System

WIN10

PySimpleGUI Port (tkinter, Qt, Wx, Web)

tkinter


Versions

Version information can be obtained by calling sg.main_get_debug_data()
Or you can print each version shown in ()

Python version (sg.sys.version)

3.9.9

PySimpleGUI Version (sg.__version__)

4.60.0.4

GUI Version (tkinter (sg.tclversion_detailed), PySide2, WxPython, Remi)

8.6.12


Your Experience In Months or Years (optional)

2+ Years Python programming experience

10+ Years Programming experience overall

Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine)
tkinter
Anything else you think would be helpful?
None


Troubleshooting

These items may solve your problem. Please check those you've done by changing - [ ] to - [X]

  • Searched main docs for your problem www.PySimpleGUI.org
  • Looked for Demo Programs that are similar to your goal Demos.PySimpleGUI.org
  • If not tkinter - looked for Demo Programs for specific port
  • For non tkinter - Looked at readme for your specific port if not PySimpleGUI (Qt, WX, Remi)
  • Run your program outside of your debugger (from a command line)
  • Searched through Issues (open and closed) to see if already reported Issues.PySimpleGUI.org
  • Tried using the PySimpleGUI.py file on GitHub. Your problem may have already been fixed but not released

Detailed Description

The location of a window set to wrong location of screen if the height or width of this window is large than it of the screen.

Code To Duplicate

import PySimpleGUI as sg

layout = [[sg.Text('Hello World', size=500)]]
window = sg.Window('Title', layout, finalize=True)
print(sg.Window.get_screen_size())
print(window.TKroot.geometry())
window.read(close=True)
(1536, 864)
1540x36+-2498+414

In, geometry strings

  • If it has the form -x, the right side of the window is x pixels from the right side of the desktop.
  • If it has the form -y, the bottom of the window will be y pixels above the bottom edge of the desktop.

Screenshot, Sketch, or Drawing


Watcha Makin?

If you care to share something about your project, it would be awesome to hear what you're building.