Programmatically make app FULL SCREEN in PySimpleGUI

13,450

[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)
Share:
13,450
2017kamb
Author by

2017kamb

I am a coder.

Updated on June 22, 2022

Comments

  • 2017kamb
    2017kamb almost 2 years

    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

  • 2017kamb
    2017kamb almost 5 years
    sorry my question was not clearly asked but now I modified it. Actually I want to show my app such that not even task bar overlap it. My app should cover the whole screen. I have to run this app on Raspberry Pi, Debian 8.
  • Mike from PSG
    Mike from PSG almost 5 years
    In that case, you should simply create the window with no titlebar, with location = (0,0), and size=your screen's size. I've seen this successfully used on a Pi.
  • Mike from PSG
    Mike from PSG almost 5 years
    Did the no-titlebar and resizing of the window fix your issue?
  • 2017kamb
    2017kamb almost 5 years
    No, issue not solved yet. I change the screen as Pi device size i.e size=(800, 480), location=(0, 0) and no_titlebar=True but titlebar of operating system is still showing over the app. Code is: sg.Window('Test App', grab_anywhere=False, size=(800, 480), no_titlebar=True, location=(0, 0)).Layout(layout)
  • Mike from PSG
    Mike from PSG almost 5 years
    You are missing the important parameter: keep_on_top=True. This is what should cause the window to be on top of the task bar.
  • 2017kamb
    2017kamb almost 5 years
    one thing happening in raspberryPi after adding no_titlebar=True - User is unable to input in any text in InputText. If I remove no_titlebar=True then InputText is working fine in Raspberry Pi. While with no_titlebar in my PC that is having ubuntu, it's working fine. Any idea why no_titlebar is working perfectly in normal PC while not working in RaspberryPi?
  • Mike from PSG
    Mike from PSG almost 5 years
    Wow, that's a weird bug. I don't recall having any focus issues in the past. It won't take input from single nor multiline on the Pi at the moment with no_titlebar set. I'll file bug on GitHub. Thanks for this.
  • Christopher Biggs
    Christopher Biggs over 3 years
    In order to get the window to overlay the Raspberry Pi panel, you need to change a setting on the raspberry pi panel. Right click the panel, choose panel settings, go to the "Advanced tab" and un-check change the "Reserve space, and not covered by maximized windows" option.
  • NJHJ
    NJHJ almost 3 years
    For this to work now, you will need the parameter resizable=True i.e. window = sg.Window('Window Title', layout, resizable=True).Finalize()
  • Mike from PSG
    Mike from PSG almost 3 years
    Most up to date info is going to be on the project's github and documentation... This is part of problem of using SO for support. Old, outdated conventions are picked up. The format of the code has changed. The techniques for finalizing a window are different. Getting starting code here puts projects 2 years behind the progress made.
  • Paul Jurczak
    Paul Jurczak over 2 years
    @MikefromPSG I used sg.Window('Window', [[]], no_titlebar=True, location=(0,0), size=(1200,1600), keep_on_top=True).Finalize() with success. Care to post an up-to-date version? Searching for full screen on pysimplegui.readthedocs.io/en/latest doesn't produce any useful results.