Code for buttons or text not working with PySimpleGui

Viewed 11
import PySimpleGUI as sg

layout = [[sg.Text("Placeholder")], [sg.Button("OK")]]
window = sg.Window('Window Title', layout, location=(0,0), size=(1000,700), keep_on_top=True)

while True:
    event, values = window.read()

    if event == "OK" or event == sg.WIN_CLOSED:
        break

I am new to GUI programming. I tried to use this code to create a simple window with a button but when I do, I only get a blank screen without buttons or text.

0 Answers
Related