简体   繁体   English

如何在pysimplegui中更改布局大小?

[英]How to change layout size in pysimplegui?

I'm using pysimplegui, when I run this code it shows a very small screen...我正在使用 pysimplegui,当我运行此代码时,它显示一个非常小的屏幕...

I would like to know if there is a size attribute to make with ka screen always starts in full screen, that is, occupying my full screen by default我想知道有没有size属性让ka screen总是全屏启动,也就是默认占用我的全屏

import PySimpleGUI as sg

layout = [ [sg.Button('Hello World3')] ]

window = sg.Window('This is a long heading.', layout)
while True:
    event, values = window.read()
    if event == sg.WIN_CLOSED or event == 'Close':
        break
    break
window.close()

Using method maximize of sg.Window after window finalized.在窗口完成后使用sg.Window方法maximize

import PySimpleGUI as sg

layout = [ [sg.Button('Hello World3')] ]

window = sg.Window('This is a long heading.', layout, finalize=True)
window.maximize()

while True:
    event, values = window.read()
    if event == sg.WIN_CLOSED or event == 'Close':
        break
    break
window.close()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM