I want to print an output something like this by using pysimplegui
import PySimpleGUI as sg
print("The age of the universe is", age_of_universe, "Gyr")
print("The age of universe at z = ", z, "is", age_of_universe_at_z,)
print("Lookback time is", lookback_time , "Gyr")
print("Comoving distance to an object at z =", z , "is" , comoving_distance, "Mpc")
print("Luminosity distance to an object at z =", z, "is", luminosity_distance, "Mpc")
print("Angular diameter distance to an object at z =", z, "is", angular_distance, "Mpc")
I tried to use the popup method. However this time the thing that written inside the popup becomes the name of the title bar
sg.popup('This is the modified LightGreen3 Theme', 'It has black button text')

So how can I print these things and can name the title bar whatever I want.
Thanks.
Note: I can accept solutions offered by using tkinter but I prefer pysimpleguı
In PySimpleGUI the parameter to look for when you want to set the titlebar text is title. All of the popups have a title parameter like the Window object does.
This popup window has a title:

the code used to make it is:
sg.popup('This is a popup.....Make sure it is long enough to see title.', title='My own title')
You can find a description of the popup parameters in the main documentation, http://www.PySimpleGUI.org.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With