Files
python-VM/gui-test/demo.py
2019-11-19 23:50:00 +00:00

24 lines
626 B
Python

import PySimpleGUI as sg
import sys
print(sys.version)
sg.change_look_and_feel('DarkAmber') # Add a little color
# All the stuff inside your window.
layout = [
[sg.Text('Some text on Row 1')],
[sg.Text('Enter something on Row 2'), sg.InputText()],
[sg.Button('Ok'), sg.Button('Cancel')],
]
# Create the Window
window = sg.Window('Window Title', layout)
# Event Loop to process "events" and get the "values" of the inputs
while True:
event, values = window.read()
if event in (None, 'Cancel'): # if user closes window or clicks cancel
break
print('You entered ', values[0])
window.close()