Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically make app FULL SCREEN in PySimpleGUI

How to make PySimpleGUI app to be open in full screen, what I mean taking up the entire screen, not even leaving the task bar at the bottom of the screen?

This app will be running on Debian 8.

How to do this? enter image description here

like image 696
2017kamb Avatar asked Jun 04 '19 05:06

2017kamb


People also ask

Is there a way to make pysimplegui run full screen?

It'll run because PySimpleGUI is highly backward compatible, but it's not the recommended calls anymore] Call window.Maximize () to make your window maximized as if you clicked on the titlebar to make it full screen. There are no parameters.

How do I find the location of a pysimplegui window?

Window Location PySimpleGUI computes the exact center of your window and centers the window on the screen. If you want to locate your window elsewhere, such as the system default of (0,0), if you have 2 ways of doing this. The first is when the window is created. Use the locationparameter to set where the window.

How to create an application with pysimplegui?

In this tutorial, you learned how to: 1 Install the PySimpleGUI package 2 Create basic user interface elements with PySimpleGUI 3 Create some applications, such as an image viewer, with PySimpleGUI 4 Integrate PySimpleGUI with Matplotlib 5 Use computer vision in PySimpleGUI 6 Package your PySimpleGUI application for Windows

How can I make pysimplegui run faster?

Turned off Grab Anywhere (note you can always use Control+Drag to move any PySimpleGUI window) Freed up graph lines as they scroll off the screen for better memory management Made the upgrade from GitHub status window smaller to fit small screens better Global Settings Restructured the Global Settings window to be tabbed


2 Answers

[EDIT May 2021 - This is an old answer. The method naming is different now. The coding conventions have changed. The documentation and examples on the PySimpleGUI GitHub have all been updated, bu StackOverflow of course has not. The result is that if you're copying code from StackOverflow, you're instantly behind. You're missing out. It'll run because PySimpleGUI is highly backward compatible, but it's not the recommended calls anymore]

Call window.Maximize() to make your window maximized as if you clicked on the titlebar to make it full screen. There are no parameters.

Make sure your window is fully created by adding .Finalize() to the end of your Window creation call like this:

window = sg.Window('Window Title', layout).Finalize()
window.Maximize()

If you want nothing at all showing except your application, then turn off the titlebar, set location = (0,0) and size=(width, height) of your screen. It won't hurt to turn on the keep_on_top parameter, unless you're planning on multiple windows.

Something like this (change the size to match your screen):

window = sg.Window('Window Title', layout, no_titlebar=True, location=(0,0), size=(800,600), keep_on_top=True)
like image 133
Mike from PSG Avatar answered Nov 15 '22 11:11

Mike from PSG


We can also fix this problem by giving parameter 'resizable' to 'True'.

window = sg.Window('Window Title', layout, resizable=True)

like image 28
Habeeb Rahman K T Avatar answered Nov 15 '22 11:11

Habeeb Rahman K T