loading
open in
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import PySimpleGUIWeb as sg      
  
print('Starting up...')  
# Very basic window.  Return values as a dictionary      

layout = [      
          [sg.Text('Please enter your Name, Address, Phone')],      
          [sg.Text('Name', size=(15, 1)), sg.InputText('name', key='_NAME_')],      
          [sg.Text('Address', size=(15, 1)), sg.InputText('address', key='_ADDRESS_')],      
          [sg.Text('Phone', size=(15, 1)), sg.InputText('phone', key='_PHONE_')],      
          [sg.Submit(), sg.Cancel()]      
          ]      

window = sg.Window('Simple data entry GUI').Layout(layout)  
  
event, values = window.Read()  

print(event, values['_NAME_'], values['_ADDRESS_'], values['_PHONE_'])    
print('values dictionary = ', values)
window.Close()