I am using PYsimpleGUI in my python code, and while using the popup element how do you resize the popup window?
My code:
import PySimpleGUI as sg
sg.popup("Hello!")
How to resize sg.popup?
Also, is there an option to add a title to the popup window?
Unfortunately there is no size parameter in
sg.popup
, however you can adjust the size of the window by changing the contents of the text shown, ie. longer string and some empty lines.Another option would be creating a new pop up funtion that works similar to the
sg.popup
but based onsg.Window
object. This way you can be more flexible with the parameters.You can add the title by using the title parameter:
sg.popup('world', title='hello')